mirror of
https://github.com/status-im/miniupnp.git
synced 2025-02-04 10:23:50 +00:00
9c79f2496f
Rework systemd units to make use of newly-added systemd integration, reference correct iptables/nft scripts, not hardcode paths and generally make use of the correct idioms. Additionally, when `configure --systemd` is used, teach `make install` to install the service file instead of the init script.
27 lines
667 B
Desktop File
27 lines
667 B
Desktop File
[Unit]
|
|
Description=Lightweight UPnP IGD daemon
|
|
Documentation=man:miniupnpd(8)
|
|
After=network.target network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=notify
|
|
ExecStart=/bin/sh -c 'exec %BINDIR%/miniupnpd -D \
|
|
-f %CONFIGDIR%/miniupnpd.conf \
|
|
-p /run/miniupnpd/miniupnpd.pid \
|
|
-u "$(systemd-id128 --uuid machine-id)" "$@" \
|
|
' - $MINIUPNPD_ARGS
|
|
ExecStartPre=%CONFIGDIR%/nft_init.sh
|
|
ExecStopPost=%CONFIGDIR%/nft_removeall.sh
|
|
|
|
Environment=MINIUPNPD_ARGS=
|
|
EnvironmentFile=-/etc/conf.d/miniupnpd
|
|
|
|
StateDirectory=miniupnpd
|
|
RuntimeDirectory=miniupnpd
|
|
ConfigurationDirectory=miniupnpd
|
|
PIDFile=/run/miniupnpd/miniupnpd.pid
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|