|
@@ -551,12 +551,16 @@ function mesh_batman {
|
551
|
551
|
BATMAN_DAEMON=$rootdir/etc/systemd/system/batman.service
|
552
|
552
|
echo '[Unit]' > $BATMAN_DAEMON
|
553
|
553
|
echo 'Description=B.A.T.M.A.N. Advanced' >> $BATMAN_DAEMON
|
|
554
|
+ echo 'After=network.target' >> $BATMAN_DAEMON
|
554
|
555
|
echo '' >> $BATMAN_DAEMON
|
555
|
556
|
echo '[Service]' >> $BATMAN_DAEMON
|
556
|
557
|
echo 'Type=oneshot' >> $BATMAN_DAEMON
|
|
558
|
+ echo 'RemainAfterExit=yes' >> $BATMAN_DAEMON
|
557
|
559
|
echo "ExecStart=/var/lib/batman start" >> $BATMAN_DAEMON
|
558
|
560
|
echo "ExecStop=/var/lib/batman stop" >> $BATMAN_DAEMON
|
559
|
|
- echo 'RemainAfterExit=yes' >> $BATMAN_DAEMON
|
|
561
|
+ echo 'Restart=on-failure' >> $BATMAN_DAEMON
|
|
562
|
+ echo 'SuccessExitStatus=3 4' >> $BATMAN_DAEMON
|
|
563
|
+ echo 'RestartForceExitStatus=3 4' >> $BATMAN_DAEMON
|
560
|
564
|
echo '' >> $BATMAN_DAEMON
|
561
|
565
|
echo '# Allow time for the server to start/stop' >> $BATMAN_DAEMON
|
562
|
566
|
echo 'TimeoutSec=300' >> $BATMAN_DAEMON
|