Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

Cron "bug" after updating from 1.8.3 to 2.0.0 #50

Closed
Panja0 opened this issue Jul 8, 2020 · 2 comments · Fixed by #51
Closed

Cron "bug" after updating from 1.8.3 to 2.0.0 #50

Panja0 opened this issue Jul 8, 2020 · 2 comments · Fixed by #51
Assignees
Labels
bug Something isn't working

Comments

@Panja0
Copy link

Panja0 commented Jul 8, 2020

New installs will use the smart function by default. Existing users who want to use this new method as their standard should run ./gravity-sync.sh automate function to replace the existing automated pull with the new Smart Sync.

Describe the Issue
After updating to v2.0.0 I did a ./gravity-sync.sh automate to change to the new standard.
Instead of replacing the excisting cron job it adds a new one. Resulting in a double job now.

crontab -l
*/15 * * * * /bin/bash /home/pi/gravity-sync/gravity-sync.sh pull > /home/pi/gravity-sync/gravity-sync.cron
*/15 * * * * /bin/bash /home/pi/gravity-sync/gravity-sync.sh > /home/pi/gravity-sync/gravity-sync.cron

Configuration:

  • Debian 10
  • ESXi v7.0
  • OpenSSH
  • keypair
  • GS 2.0.0
  • Pi-hole V5.0

Workaround:
I did a crontab -e and removed the double line manually.

@Panja0 Panja0 changed the title Bug after updating from 1.8.3 to 2.0.0 Cron "bug" after updating from 1.8.3 to 2.0.0 Jul 8, 2020
@vmstan vmstan self-assigned this Jul 8, 2020
@vmstan vmstan added the bug Something isn't working label Jul 8, 2020
@vmstan vmstan linked a pull request Jul 8, 2020 that will close this issue
@vmstan
Copy link
Owner

vmstan commented Jul 8, 2020

Yep, in prior versions I had it looking for .sh pull in the existing code to remove it, because that was unique enough, but in 2.0 it switched to looking for the name of the full GS script based on a variable and I still had the single quote mark around the variable name so it wasn't getting properly parsed. Switched to double quotes and published as 2.0.1.

@Panja0
Copy link
Author

Panja0 commented Jul 8, 2020

Updated to v2.0.1 and can confirm that it's working now, as advertised! Thanks for the quick fix!

@Panja0 Panja0 closed this as completed Jul 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants