Commit 4cbab1f6 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

Debian cron file is now obtain from slapos-node one with prepare script

Doc updated for cron file
parent 5b2c3dad
......@@ -69,4 +69,11 @@ It makes a tarball out of it to be used by obs.
It then fetch packaging configuration from templates directory. Everything is then commit to obs thanks to osc.
So to build package just run:
# bash prepare_slapos_build.sh
\ No newline at end of file
# bash prepare_slapos_build.sh
About cron file
---------------
Main cron file is situated in slapos-node/template/slapos-node.cron.d
Prepare script will copy this one in the debian directory.
WARNING: if you update cron, do not forget to update slaptest which check cron file
\ No newline at end of file
......@@ -51,7 +51,8 @@ osc add slapos.spec
# Add entry to changelog
cd $TEMPLATES_DIRECTORY/debian
dch -pm -v $VERSION+$RECIPE_VERSION+0 --check-dirname-level=0 "New version of slapos ($VERSION+$RECIPE_VERSION)"
# Add cronfile
cp $CURRENT_DIRECTORY/$SLAPOS_ORGINAL_DIRECTORY/template/slapos-node.cron.d $TEMPLATES_DIRECTORY/debian/cron.d
cd $TEMPLATES_DIRECTORY
tar -czf debian.tar.gz debian
cd $OBS_DIRECTORY
......
SHELL=/bin/sh
PATH=/usr/bin:/usr/sbin:/sbin:/bin
MAILTO=root
*/5 * * * * root /opt/slapos/bin/slapgrid-sr --verbose --logfile=/opt/slapos/slapgrid-sr.log --pidfile=/opt/slapos/slapgrid-sr.pid /etc/opt/slapos/slapos.cfg >> /opt/slapos/slapgrid-sr.log 2>&1
*/5 * * * * root /opt/slapos/bin/slapgrid-cp --verbose --logfile=/opt/slapos/slapgrid-cp.log --pidfile=/opt/slapos/slapgrid-cp.pid /etc/opt/slapos/slapos.cfg >> /opt/slapos/slapgrid-cp.log 2>&1
# slapgrid-ur: hardcoded script to rerun slapgrid-ur if failed.
0 0 * * * root /opt/slapos/bin/slapgrid-ur --maximal_delay=86400 --verbose --logfile=/opt/slapos/slapgrid-ur.log --pidfile=/opt/slapos/slapgrid-ur.pid /etc/opt/slapos/slapos.cfg; i=20; while [ $? != 0 ]; do /opt/slapos/bin/slapgrid-ur --verbose --logfile=/opt/slapos/slapgrid-ur.log --pidfile=/opt/slapos/slapgrid-ur.pid /etc/opt/slapos/slapos.cfg >> /opt/slapos/slapgrid-ur.log 2>&1; sleep $(($i*60)); if [ $i < 20 ]; then let i++; fi; done;
0 0 * * * root /opt/slapos/bin/slapformat --verbose --log_file=/opt/slapos/slapformat.log -c /etc/opt/slapos/slapos.cfg >> /opt/slapos/slapformat.log 2>&1
0/10 * * * * root if [ -f /etc/opt/slapos/openvpn-needed ]; then ifconfig tapVPN | grep "Scope:Global" > /dev/null ;if [ $? = 0 ]; then ROUTES=$(ip -6 r l | grep default | awk '{print $5}'); for GW in $ROUTES ; do if [ ! $GW = tapVPN ]; then /sbin/ip -6 route del default dev $GW;fi ;done ;fi ;fi
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