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