X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=debian%2Fonak.init;h=9ab011bd4286a892f43a62adf67e29894106d2eb;hb=743957a08f068529d3add3e8485678b4e5034195;hp=34d0348ba415d59c1e62af4bb1da1f25907521a1;hpb=bccee9f66efda51a5e900ea57b5a130f2e99faf1;p=onak.git diff --git a/debian/onak.init b/debian/onak.init old mode 100755 new mode 100644 index 34d0348..9ab011b --- a/debian/onak.init +++ b/debian/onak.init @@ -1,6 +1,6 @@ #!/bin/sh ### BEGIN INIT INFO -# Provides: pgp-keyserver +# Provides: onak pgp-keyserver # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 @@ -32,7 +32,7 @@ SCRIPTNAME=/etc/init.d/onak # and status_of_proc is working. . /lib/lsb/init-functions -if ! grep -q -E '^use_keyd *(true|yes|1)$' /etc/onak.conf; then +if ! grep -q -E '^use_keyd=*(true|yes|1)$' /etc/onak.ini; then exit 0 fi @@ -55,11 +55,22 @@ case "$1" in 1) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac ;; + restart|force-reload) + [ "$VERBOSE" != no ] && log_daemon_msg "Restarting $DESC" "$NAME" + /usr/bin/keydctl quit + start-stop-daemon --stop --oknodo --user onak --exec $DAEMON + start-stop-daemon --start --oknodo --user onak --chuid onak \ + --exec $DAEMON + case "$?" in + 0) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 1) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; status) status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? ;; *) - echo "Usage: $SCRIPTNAME {start|stop|status}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|status}" >&2 exit 3 ;; esac