Commit 303ee9b9 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

Now slapformat is relaunch till it work,

the intervall between restarts increase from 1 min to 20 min maximum
parent fb4f5d39
...@@ -112,8 +112,18 @@ sysctl -w \ ...@@ -112,8 +112,18 @@ sysctl -w \
net.ipv6.neigh.default.gc_thresh3=2048 net.ipv6.neigh.default.gc_thresh3=2048
# Execute slapformat # Execute slapformat
i=1
echo -n "Running slapformat..." echo -n "Running slapformat..."
/opt/slapos/bin/slapformat --verbose --console /etc/slapos/slapos.cfg /opt/slapos/bin/slapformat --verbose --console /etc/slapos/slapos.cfg
while [[ $? != 0 ]]; do
sleep $(($i*60))
if [[ $i < 20 ]]; then
let i++
fi
echo "Retrying slapformat"
/opt/slapos/bin/slapformat --verbose --console /etc/slapos/slapos.cfg
# if slapformat fail more than 10 time the script is restarted
done
echo "done." echo "done."
echo -n "Banging..." echo -n "Banging..."
/opt/slapos/bin/bang -m "Rebooted" /etc/slapos/slapos.cfg /opt/slapos/bin/bang -m "Rebooted" /etc/slapos/slapos.cfg
......
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