Commit 1d9fcf1c authored by Jean-Baptiste Petre's avatar Jean-Baptiste Petre Committed by Cédric de Saint Martin

Add random crontab etc/cron.d/slapos slapupdate

parent 5c4f0fe6
...@@ -119,6 +119,8 @@ if [ $SLAPOS_GOOD_CONFIGURATION != $SLAPOS_CONFIGURATION ]; then ...@@ -119,6 +119,8 @@ if [ $SLAPOS_GOOD_CONFIGURATION != $SLAPOS_CONFIGURATION ]; then
fi fi
# Set up cron # Set up cron
let HOUR=$RANDOM%23;
let MINUTE=$RANDOM%60;
# Remove default route for ipv6 in case of openvpn-needed # Remove default route for ipv6 in case of openvpn-needed
echo """# BEWARE: This file will be automatically regenerated on each boot echo """# BEWARE: This file will be automatically regenerated on each boot
...@@ -126,7 +128,7 @@ SHELL=/bin/sh ...@@ -126,7 +128,7 @@ SHELL=/bin/sh
PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin
MAILTO=root MAILTO=root
0 0 * * * root /usr/local/bin/slapupdate -v --slapos-configuration $SLAPOS_CONFIGURATION/slapos.cfg >> /opt/slapos/slapupdate.log 2>&1 $MINUTE $HOUR * * * root /usr/local/bin/slapupdate -v --slapos-configuration $SLAPOS_CONFIGURATION/slapos.cfg >> /opt/slapos/slapupdate.log 2>&1
"""> /etc/cron.d/slapos """> /etc/cron.d/slapos
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment