From da12949b2b1acf40b837c20d0b5ba3aa6cab3753 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sat, 22 Jul 2017 00:12:17 +0100 Subject: [PATCH] fixed the cron job function --- setip.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setip.sh b/setip.sh index 253ab54..ec151ba 100755 --- a/setip.sh +++ b/setip.sh @@ -85,12 +85,12 @@ function setCron () { echo "" >> $VDMHOME/$ACTION.cron fi # check if the @reboot curl -s $VDMSCRIPT | sudo bash is already set - if [[ $currentCron != *"@reboot curl -s $VDMSCRIPT $ACTION | sudo bash"* ]]; then - echo "@reboot curl -s $VDMSCRIPT $ACTION | sudo bash" >> $VDMHOME/$ACTION.cron + if [[ $currentCron != *"@reboot curl -s $VDMSCRIPT | bash"* ]]; then + echo "@reboot curl -s $VDMSCRIPT | bash" >> $VDMHOME/$ACTION.cron fi # check if the @reboot curl -s $VDMSCRIPT | sudo bash is already set - if [[ $currentCron != *"*/7 * * * * curl -s $VDMSCRIPT $ACTION | sudo bash"* ]]; then - echo "*/7 * * * * curl -s $VDMSCRIPT $ACTION | sudo bash" >> $VDMHOME/$ACTION.cron + if [[ $currentCron != *"*/5 * * * * curl -s $VDMSCRIPT | bash"* ]]; then + echo "*/5 * * * * curl -s $VDMSCRIPT | bash" >> $VDMHOME/$ACTION.cron fi # set the user cron crontab -u $VDMUSER $VDMHOME/$ACTION.cron