Restart batman daemon on failure
This commit is contained in:
parent
1459693650
commit
6863f6413b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue