From 6863f6413b88f2dd98caccd207b823656c937439 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 26 Jun 2016 10:02:18 +0100 Subject: [PATCH] Restart batman daemon on failure --- src/freedombone-image-customise | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 58e58c2c..d24b5cd0 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -551,12 +551,16 @@ function mesh_batman { BATMAN_DAEMON=$rootdir/etc/systemd/system/batman.service echo '[Unit]' > $BATMAN_DAEMON echo 'Description=B.A.T.M.A.N. Advanced' >> $BATMAN_DAEMON + echo 'After=network.target' >> $BATMAN_DAEMON echo '' >> $BATMAN_DAEMON echo '[Service]' >> $BATMAN_DAEMON echo 'Type=oneshot' >> $BATMAN_DAEMON + echo 'RemainAfterExit=yes' >> $BATMAN_DAEMON echo "ExecStart=/var/lib/batman start" >> $BATMAN_DAEMON echo "ExecStop=/var/lib/batman stop" >> $BATMAN_DAEMON - echo 'RemainAfterExit=yes' >> $BATMAN_DAEMON + echo 'Restart=on-failure' >> $BATMAN_DAEMON + echo 'SuccessExitStatus=3 4' >> $BATMAN_DAEMON + echo 'RestartForceExitStatus=3 4' >> $BATMAN_DAEMON echo '' >> $BATMAN_DAEMON echo '# Allow time for the server to start/stop' >> $BATMAN_DAEMON echo 'TimeoutSec=300' >> $BATMAN_DAEMON