summaryrefslogtreecommitdiffstats
path: root/tools/frr.service.in
diff options
context:
space:
mode:
authorEmanuele Bovisio <emanuele.bovisio@eolo.it>2020-10-22 17:04:24 +0200
committerEmanuele Bovisio <emanuele.bovisio@eolo.it>2020-10-30 16:33:20 +0100
commit566397ba65a2b94864e770f7ef2f092952767eb3 (patch)
tree990cde3fe17da10f4b20a1963bd2bdc6928f95ab /tools/frr.service.in
parentMerge pull request #7343 from ton31337/fix/prefix2str_to_pFX (diff)
downloadfrr-566397ba65a2b94864e770f7ef2f092952767eb3.tar.xz
frr-566397ba65a2b94864e770f7ef2f092952767eb3.zip
tools: add PIDFile option in frr.service
when type is forking, it is recommended to also use the PIDFile= option, so that systemd can reliably identify the main process of the service. Signed-off-by: Emanuele Bovisio <emanuele.bovisio@eolo.it>
Diffstat (limited to 'tools/frr.service.in')
-rw-r--r--tools/frr.service.in26
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/frr.service.in b/tools/frr.service.in
new file mode 100644
index 000000000..836ce06be
--- /dev/null
+++ b/tools/frr.service.in
@@ -0,0 +1,26 @@
+[Unit]
+Description=FRRouting
+Documentation=https://frrouting.readthedocs.io/en/latest/setup.html
+Wants=network.target
+After=network-pre.target systemd-sysctl.service
+Before=network.target
+OnFailure=heartbeat-failed@%n.service
+
+[Service]
+Nice=-5
+Type=forking
+NotifyAccess=all
+StartLimitInterval=3m
+StartLimitBurst=3
+TimeoutSec=2m
+WatchdogSec=60s
+RestartSec=5
+Restart=on-abnormal
+LimitNOFILE=1024
+PIDFile=@CFG_STATE@/watchfrr.pid
+ExecStart=@CFG_SBIN@/frrinit.sh start
+ExecStop=@CFG_SBIN@/frrinit.sh stop
+ExecReload=@CFG_SBIN@/frrinit.sh reload
+
+[Install]
+WantedBy=multi-user.target