|
@@ -357,12 +357,16 @@ function mesh_batman {
|
357
|
357
|
BATMAN_DAEMON=$rootdir/etc/systemd/system/batman.service
|
358
|
358
|
echo '[Unit]' > $BATMAN_DAEMON
|
359
|
359
|
echo 'Description=B.A.T.M.A.N. Advanced' >> $BATMAN_DAEMON
|
|
360
|
+ echo 'After=network.target' >> $BATMAN_DAEMON
|
360
|
361
|
echo '' >> $BATMAN_DAEMON
|
361
|
362
|
echo '[Service]' >> $BATMAN_DAEMON
|
362
|
363
|
echo 'Type=oneshot' >> $BATMAN_DAEMON
|
|
364
|
+ echo 'RemainAfterExit=yes' >> $BATMAN_DAEMON
|
363
|
365
|
echo "ExecStart=/var/lib/batman start" >> $BATMAN_DAEMON
|
364
|
366
|
echo "ExecStop=/var/lib/batman stop" >> $BATMAN_DAEMON
|
365
|
|
- echo 'RemainAfterExit=yes' >> $BATMAN_DAEMON
|
|
367
|
+ echo 'Restart=on-failure' >> $BATMAN_DAEMON
|
|
368
|
+ echo 'SuccessExitStatus=3 4' >> $BATMAN_DAEMON
|
|
369
|
+ echo 'RestartForceExitStatus=3 4' >> $BATMAN_DAEMON
|
366
|
370
|
echo '' >> $BATMAN_DAEMON
|
367
|
371
|
echo '# Allow time for the server to start/stop' >> $BATMAN_DAEMON
|
368
|
372
|
echo 'TimeoutSec=300' >> $BATMAN_DAEMON
|