diff options
author | Christian Poessinger <christian@poessinger.com> | 2017-12-30 18:12:23 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2017-12-30 18:43:01 +0100 |
commit | 5286c027794cec6759495ba15dcab999c5921ec6 (patch) | |
tree | d92df5126d86a3f528e38b2d8b17d086c4fac54b | |
parent | 22cb537289b0fdacab9206ec64e811763677c0e2 (diff) | |
download | udp-broadcast-relay-5286c027794cec6759495ba15dcab999c5921ec6.tar.gz udp-broadcast-relay-5286c027794cec6759495ba15dcab999c5921ec6.zip |
Support systemd instanced service units
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | udp-broadcast-relay.default | 2 | ||||
-rw-r--r-- | udp-broadcast-relay@.service (renamed from udp-broadcast-relay.service) | 7 |
3 files changed, 6 insertions, 7 deletions
@@ -12,5 +12,5 @@ install: install -d $(DESTDIR)/lib/systemd/system install -d $(DESTDIR)/etc/default install -m 0755 udp-broadcast-relay $(DESTDIR)/usr/sbin - install -m 0644 udp-broadcast-relay.service $(DESTDIR)/lib/systemd/system - install -m 0644 udp-broadcast-relay.default $(DESTDIR)/etc/default/udp-broadcast-relay + install -m 0644 udp-broadcast-relay@.service $(DESTDIR)/lib/systemd/system + install -m 0644 udp-broadcast-relay.default $(DESTDIR)/etc/default/udp-broadcast-relay1 diff --git a/udp-broadcast-relay.default b/udp-broadcast-relay.default index de17af3..4831bc7 100644 --- a/udp-broadcast-relay.default +++ b/udp-broadcast-relay.default @@ -1,2 +1,2 @@ # Uncomment to start UDP bcast relay on the listed interfaces -#DAEMON_ARGS="1 1900 eth0 eth1 eth2" +DAEMON_ARGS="1900 eth0 eth1 eth2" diff --git a/udp-broadcast-relay.service b/udp-broadcast-relay@.service index e172e5d..90b37b7 100644 --- a/udp-broadcast-relay.service +++ b/udp-broadcast-relay@.service @@ -4,12 +4,11 @@ After=network.target RequiresMountsFor=/run [Service] -Type=notify +Type=simple NotifyAccess=main -EnvironmentFile=-/etc/default/udp-broadcast-relay -ExecStart=/usr/sbin/udp-broadcast-relay $DAEMON_ARGS +EnvironmentFile=-/etc/default/udp-broadcast-relay%I +ExecStart=/usr/sbin/udp-broadcast-relay %I $DAEMON_ARGS Restart=on-failure -Type=forking [Install] WantedBy=multi-user.target |