diff options
author | root <root@rshg054.dnsready.net> | 2012-06-11 00:02:18 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-06-11 00:02:18 +0000 |
commit | 4714cec7e8367a7618b168d0db4bc085dbfaac8a (patch) | |
tree | b1f3049ee78988b0db6ec69637a1ee37c8b63b3f /staging/ypbind-mt/ypbind | |
parent | 7b2739f21a7ed0d52497fa381c9a2383e71ab7a8 (diff) |
Mon Jun 11 00:02:18 UTC 2012
Diffstat (limited to 'staging/ypbind-mt/ypbind')
-rwxr-xr-x | staging/ypbind-mt/ypbind | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/staging/ypbind-mt/ypbind b/staging/ypbind-mt/ypbind new file mode 100755 index 000000000..6a5ef11e3 --- /dev/null +++ b/staging/ypbind-mt/ypbind @@ -0,0 +1,35 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +. /etc/conf.d/ypbind +. /etc/conf.d/nisdomainname + +name=ypbind +PID=$(pidof -o %PPID /usr/sbin/ypbind) + +case "$1" in +start) + stat_busy "Starting $name daemon" + [[ -n $NISDOMAINNAME ]] && /usr/bin/domainname "$NISDOMAINNAME" &>/dev/null + [[ -z "$PID" ]] && /usr/sbin/ypbind $YPBIND_ARGS &>/dev/null \ + && { add_daemon $name; stat_done; } \ + || { stat_fail; exit 1; } + ;; +stop) + stat_busy "Stopping $name daemon" + [[ -n "$PID" ]] && kill $PID &>/dev/null \ + && { rm_daemon $name; stat_done; } \ + || { stat_fail; exit 1; } + ;; +restart) + $0 stop + sleep 1 + $0 start + ;; +*) + echo "usage: $0 {start|stop|restart}" + exit 1 + ;; +esac |