From d4773dde1d314b2553b2c71b2391e308f7c7ca27 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 21 Nov 2000 17:31:44 +0000 Subject: Add 'restart' and 'status' functionality. --- comms/conserver/files/conserver.sh.in | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'comms/conserver/files/conserver.sh.in') diff --git a/comms/conserver/files/conserver.sh.in b/comms/conserver/files/conserver.sh.in index 842c39e60400..cf27a4764ecf 100644 --- a/comms/conserver/files/conserver.sh.in +++ b/comms/conserver/files/conserver.sh.in @@ -1,5 +1,7 @@ #!/bin/sh +# $FreeBSD$ + if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then echo "$0: Cannot determine the PREFIX" >&2 exit 1 @@ -14,8 +16,15 @@ start) stop) killall conserver && echo -n ' conserver' ;; +restart) + $0 stop + $0 start + ;; +status) + ps -auxww | egrep '(conserver|console)' | egrep -v "($0|egrep)" + ;; *) - echo "Usage: `basename $0` {start|stop}" >&2 + echo "Usage: `basename $0` {start|stop|restart|status}" >&2 ;; esac -- cgit v1.2.3