diff options
Diffstat (limited to 'net-firewall/nufw/files/nuauth-init.d')
-rw-r--r-- | net-firewall/nufw/files/nuauth-init.d | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/net-firewall/nufw/files/nuauth-init.d b/net-firewall/nufw/files/nuauth-init.d new file mode 100644 index 000000000000..21bad8ff132f --- /dev/null +++ b/net-firewall/nufw/files/nuauth-init.d @@ -0,0 +1,27 @@ +#!/sbin/runscript + +depend() { + before net +} + +checkconfig() { + if [ ! -e /etc/nufw/nuauth.conf ]; then + eerror "You need a /etc/nufw/nuauth.conf file to run nuauth" + eerror "There is sample file in /usr/share/doc/nufw-version/" + return 1 + fi +} + +start() { + checkpath -d /run/nuauth + checkconfig || return 1 + ebegin "Starting nuauth" + start-stop-daemon --start --quiet --exec /usr/sbin/nuauth -- -D ${NUAUTH_OPTIONS} + eend $? +} + +stop() { + ebegin "Stopping nuauth" + start-stop-daemon --stop --quiet --pidfile /run/nuauth/nuauth.pid + eend $? +} |