From 3695b5d62c2aef6e82abc95d775a2ebd89bce081 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 5 Jun 2011 22:48:57 +0000 Subject: Sun Jun 5 22:48:57 UTC 2011 --- testing/ypbind-mt/ypbind | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 testing/ypbind-mt/ypbind (limited to 'testing/ypbind-mt/ypbind') diff --git a/testing/ypbind-mt/ypbind b/testing/ypbind-mt/ypbind new file mode 100755 index 000000000..6a5ef11e3 --- /dev/null +++ b/testing/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 -- cgit v1.2.3-54-g00ecf