2 # Copyright (c) 2005 Jan Willamowius
7 # The echo return value for success (defined in /etc/rc.config).
11 echo -n "Starting GNU Gatekeeper"
12 ## Start daemon with startproc(8). If this fails
13 ## the echo return value is set appropriate.
15 startproc -q /usr/local/bin/gnugk || return=$rc_failed
20 echo -n "Shutting down GNU Gatekeeper"
21 ## Stop daemon with killproc(8) and if this fails
22 ## set echo the echo return value.
24 killproc -TERM /usr/local/bin/gnugk || return=$rc_failed
29 ## If first returns OK call the second, if first or
30 ## second command fails, set echo return value.
31 $0 stop && $0 start || return=$rc_failed
34 $0 stop && $0 start || return=$rc_failed
37 echo -n "Checking for GNU Gatekeeper: "
38 ## Check status with checkproc(8), if process is running
39 ## checkproc will return with exit status 0.
41 checkproc /usr/local/bin/gnugk && echo OK || echo No process
44 echo "Usage: $0 {start|stop|status|restart|reload}"
49 # Inform the caller not only verbosely and set an exit status.
50 test "$return" = "$rc_done" || exit 1