Skip to content
Snippets Groups Projects
Commit 6863f641 authored by Bob Mottram's avatar Bob Mottram
Browse files

Restart batman daemon on failure

parent 14596936
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment