buildroot/package/quagga/quagga@.service
Nathaniel Roach 649cf99821 package/quagga: Add systemd.service file
Use a template service file as all of the daemons use almost
identical arguments and generally appear the same to the init
system.

We "Wants=" zebra as that's the daemon for interfacing to the
kernel, and it's not required for the other daemons to work
but it's probably going to be used in nearly all setups.

/usr/bin/env is needed as systemd doesn't allow the instance
variable (%i) in the executable path.

We don't enable these services by default as this would require
creating configuration and /etc/default files. (And is easily
achieved with an FS overlay)

[Peter: remove killmode/killsignal/restartsec as suggested by Maxime]
Signed-off-by: Nathaniel Roach <nroach44@gmail.com>
Reviewed-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-07-03 16:04:34 +02:00

18 lines
403 B
Desktop File

[Unit]
Description=Quagga %i routing daemon
ConditionFileIsExecutable=/usr/sbin/%i
Wants=quagga@zebra.service
[Service]
Type=simple
EnvironmentFile=/etc/default/quagga-%i
PrivateTmp=true
# Systemd doesn't like having %i in the executable path.
ExecStart=/usr/bin/env /usr/sbin/%i $OPTS -f /etc/quagga/%i.conf
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
[Install]
WantedBy=multi-user.target