]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blobdiff - hostapd/systemd/hostapd@.service
hostapd: Make new-style systemd unit file.
[people/amarx/ipfire-3.x.git] / hostapd / systemd / hostapd@.service
index 0fbfab50b1b18757464e8eb865788af1234e9e42..b0c0a124d4afcc85e12474800b17514a80634bd2 100644 (file)
@@ -2,6 +2,9 @@
 Description=hostap daemon on %I
 
 [Service]
-ExecStart=/usr/sbin/hostapd -P /run/network/hostapd/%I/pid /run/network/hostapd/%I/config
+ExecStartPre=/usr/lib/network/helpers/hostapd-config-helper create %I
+ExecStart=/usr/sbin/hostapd -P /run/hostapd/%I.pid /run/network/ports/%I/hostapd.conf
+ExecStopPost=/usr/lib/network/helpers/hostapd-config-helper remove %I
+Restart=on-failure
 UtmpIdentifier=%I
 KillMode=process