diff options
author | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-12-07 10:52:21 -0300 |
---|---|---|
committer | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-12-07 10:52:21 -0300 |
commit | 404b7ff94ece6bb2ce0e9df042ac1fe798137c83 (patch) | |
tree | 240322ee16b033bd3b85f15b553bea0526d0b16e /community/sslh/sslh.rc | |
parent | 01b1bb8751b4819c5024328a206d6962b9ee30fb (diff) | |
parent | 99165f43e38ff3f1729388dcc261a152103d6f8d (diff) |
Merge branch 'master' of ssh://gparabola/abslibre-mips64el
Diffstat (limited to 'community/sslh/sslh.rc')
-rw-r--r-- | community/sslh/sslh.rc | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/community/sslh/sslh.rc b/community/sslh/sslh.rc new file mode 100644 index 000000000..05b03bc3e --- /dev/null +++ b/community/sslh/sslh.rc @@ -0,0 +1,34 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/${0##*/} + +NAME=sslh +DAEMON=/usr/sbin/sslh +PID=$(pidof -o %PPID $DAEMON) + +case "$1" in + start) + stat_busy "Starting $NAME daemon" + [[ ! $PID ]] && $DAEMON $DAEMON_OPTS && add_daemon $NAME && stat_done && exit 0 + stat_fail + ;; + stop) + stat_busy "Stopping $NAME daemon" + [[ $PID ]] && kill $PID &> /dev/null && rm_daemon $NAME && stat_done && exit 0 + stat_fail + ;; + restart) + $0 stop + $0 start + exit 0 + ;; + *) + echo "usage: ${0##*/} {start|stop|restart}" >&2 + ;; +esac + +exit 1 + +# vim:set ts=2 sw=2 ft=sh noet: |