More efficient way to make sure all instances are started again after reboot

parent d008f5fd
...@@ -66,15 +66,18 @@ if [ $ONLY_SLAPFORMAT = false ]; then ...@@ -66,15 +66,18 @@ if [ $ONLY_SLAPFORMAT = false ]; then
echo -n "Banging..." echo -n "Banging..."
/opt/slapos/bin/bang -m "Rebooted" $SLAPOS_CONFIGURATION/slapos.cfg /opt/slapos/bin/bang -m "Rebooted" $SLAPOS_CONFIGURATION/slapos.cfg
while [ $? != 0 ]; do while [ $? != 0 ]; do
sleep $(($i*60)) sleep $(($i*60))
if [ $i -le 20 ]; then if [ $i -le 20 ]; then
let i++ let i++
fi fi
echo "Retrying Bang" echo "Retrying Bang"
/opt/slapos/bin/bang -m "Rebooted" $SLAPOS_CONFIGURATION/slapos.cfg /opt/slapos/bin/bang -m "Rebooted" $SLAPOS_CONFIGURATION/slapos.cfg
done done
echo "done." echo "done."
# Run slapgrid on all computer partitions # Delete timestamp of all partitions so that it will force slapgrid to process them.
/opt/slapos/bin/slapgrid-cp --verbose --develop --now --logfile=/opt/slapos/slapgrid-cp.log --pidfile=/opt/slapos/slapgrid-cp.pid $SLAPOS_CONFIGURATION/slapos.cfg >> /opt/slapos/slapgrid-cp.log 2>&1 rm /srv/slapgrid/slappart*/.timestamp
# Run slapgrid now.
/opt/slapos/bin/slapgrid-cp --verbose --now --logfile=/opt/slapos/slapgrid-cp.log --pidfile=/opt/slapos/slapgrid-cp.pid $SLAPOS_CONFIGURATION/slapos.cfg >> /opt/slapos/slapgrid-cp.log 2>&1
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