mirror of
https://github.com/namibia/demo-sync.git
synced 2024-11-21 19:15:10 +00:00
fixed the cron job function
This commit is contained in:
parent
dc08facf6d
commit
da12949b2b
8
setip.sh
8
setip.sh
@ -85,12 +85,12 @@ function setCron () {
|
|||||||
echo "" >> $VDMHOME/$ACTION.cron
|
echo "" >> $VDMHOME/$ACTION.cron
|
||||||
fi
|
fi
|
||||||
# check if the @reboot curl -s $VDMSCRIPT | sudo bash is already set
|
# check if the @reboot curl -s $VDMSCRIPT | sudo bash is already set
|
||||||
if [[ $currentCron != *"@reboot curl -s $VDMSCRIPT $ACTION | sudo bash"* ]]; then
|
if [[ $currentCron != *"@reboot curl -s $VDMSCRIPT | bash"* ]]; then
|
||||||
echo "@reboot curl -s $VDMSCRIPT $ACTION | sudo bash" >> $VDMHOME/$ACTION.cron
|
echo "@reboot curl -s $VDMSCRIPT | bash" >> $VDMHOME/$ACTION.cron
|
||||||
fi
|
fi
|
||||||
# check if the @reboot curl -s $VDMSCRIPT | sudo bash is already set
|
# check if the @reboot curl -s $VDMSCRIPT | sudo bash is already set
|
||||||
if [[ $currentCron != *"*/7 * * * * curl -s $VDMSCRIPT $ACTION | sudo bash"* ]]; then
|
if [[ $currentCron != *"*/5 * * * * curl -s $VDMSCRIPT | bash"* ]]; then
|
||||||
echo "*/7 * * * * curl -s $VDMSCRIPT $ACTION | sudo bash" >> $VDMHOME/$ACTION.cron
|
echo "*/5 * * * * curl -s $VDMSCRIPT | bash" >> $VDMHOME/$ACTION.cron
|
||||||
fi
|
fi
|
||||||
# set the user cron
|
# set the user cron
|
||||||
crontab -u $VDMUSER $VDMHOME/$ACTION.cron
|
crontab -u $VDMUSER $VDMHOME/$ACTION.cron
|
||||||
|
Loading…
Reference in New Issue
Block a user