diff options
author | Juergen Daubert <jue@jue.li> | 2015-02-20 11:21:55 +0100 |
---|---|---|
committer | Juergen Daubert <jue@jue.li> | 2015-02-20 11:21:55 +0100 |
commit | 2ec34c9f0da8d03f31a38c96935ac5dde0c4420e (patch) | |
tree | 5db281cc04c4ef9f6da374b25d239d65eec3cb18 /rpcbind | |
parent | 2cc566ab615b5c4418b48db4e290cb5ee1c7c759 (diff) | |
download | opt-2ec34c9f0da8d03f31a38c96935ac5dde0c4420e.tar.gz opt-2ec34c9f0da8d03f31a38c96935ac5dde0c4420e.tar.xz |
rpcbind: improved rc script
Diffstat (limited to 'rpcbind')
-rw-r--r-- | rpcbind/.md5sum | 2 | ||||
-rw-r--r-- | rpcbind/Pkgfile | 2 | ||||
-rw-r--r-- | rpcbind/rpcbind | 22 |
3 files changed, 20 insertions, 6 deletions
diff --git a/rpcbind/.md5sum b/rpcbind/.md5sum index fab0abb67..f56cc5f1b 100644 --- a/rpcbind/.md5sum +++ b/rpcbind/.md5sum @@ -1,2 +1,2 @@ -b19843b2a0dd0a56fdec182e39b23775 rpcbind +4d4d8b3f5a19ca02d781cac5ba7d15aa rpcbind 8acf839bfef2364a05fbd6be5f8edf9a rpcbind-0.2.2.tar.bz2 diff --git a/rpcbind/Pkgfile b/rpcbind/Pkgfile index 115025da8..42fc696ca 100644 --- a/rpcbind/Pkgfile +++ b/rpcbind/Pkgfile @@ -5,7 +5,7 @@ name=rpcbind version=0.2.2 -release=1 +release=2 source=(http://downloads.sourceforge.net/project/$name/$name/$version/$name-$version.tar.bz2 \ rpcbind) diff --git a/rpcbind/rpcbind b/rpcbind/rpcbind index 18a4c163a..942101cb2 100644 --- a/rpcbind/rpcbind +++ b/rpcbind/rpcbind @@ -3,21 +3,35 @@ # /etc/rc.d/rpcbind: start/stop rpcbind daemon # +SSD=/sbin/start-stop-daemon +PROG=/sbin/rpcbind +PID=/var/run/rpcbind.pid +OPTS="-f" + case $1 in start) - /sbin/rpcbind + $SSD --start -bm --pidfile $PID --exec $PROG -- $OPTS ;; stop) - killall -q /sbin/rpcbind + $SSD --stop --remove-pidfile --retry 10 --pidfile $PID ;; restart) $0 stop - sleep 2 $0 start ;; +status) + $SSD --status --pidfile $PID + case $? in + 0) echo "$PROG is running" ;; + 1) echo "$PROG is not running but the pid file $PID exists" ;; + 3) echo "$PROG is not running" ;; + 4) echo "Unable to determine the program status" ;; + esac + ;; *) - echo "usage: $0 [start|stop|restart]" + echo "usage: $0 [start|stop|restart|status]" ;; esac # End of file + |