mirror of
https://github.com/vdm-io/dynamic-ip.git
synced 2024-12-04 16:23:13 +00:00
run cron jobs every minute
This commit is contained in:
parent
70cacd697b
commit
2a7ab4bbe7
4
getip.sh
4
getip.sh
@ -125,8 +125,8 @@ function setCron () {
|
||||
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 | bash"* ]]; then
|
||||
echo "*/7 * * * * curl -s $VDMSCRIPT | bash" >> $VDMHOME/$ACTION.cron
|
||||
if [[ $currentCron != *"* * * * * curl -s $VDMSCRIPT | bash"* ]]; then
|
||||
echo "* * * * * curl -s $VDMSCRIPT | bash" >> $VDMHOME/$ACTION.cron
|
||||
fi
|
||||
# set the user cron
|
||||
crontab -u $VDMUSER $VDMHOME/$ACTION.cron
|
||||
|
4
setip.sh
4
setip.sh
@ -118,8 +118,8 @@ function setCron () {
|
||||
echo "@reboot curl -s $VDMSCRIPT | bash" >> $VDMHOME/$ACTION.cron
|
||||
fi
|
||||
# check if the @reboot curl -s $VDMSCRIPT | sudo bash is already set
|
||||
if [[ $currentCron != *"*/5 * * * * curl -s $VDMSCRIPT | bash"* ]]; then
|
||||
echo "*/5 * * * * curl -s $VDMSCRIPT | bash" >> $VDMHOME/$ACTION.cron
|
||||
if [[ $currentCron != *"* * * * * curl -s $VDMSCRIPT | bash"* ]]; then
|
||||
echo "* * * * * curl -s $VDMSCRIPT | bash" >> $VDMHOME/$ACTION.cron
|
||||
fi
|
||||
# set the user cron
|
||||
crontab -u $VDMUSER $VDMHOME/$ACTION.cron
|
||||
|
Loading…
Reference in New Issue
Block a user