diff options
author | David E. O'Brien <obrien@FreeBSD.org> | 2000-11-21 17:31:44 +0000 |
---|---|---|
committer | David E. O'Brien <obrien@FreeBSD.org> | 2000-11-21 17:31:44 +0000 |
commit | d4773dde1d314b2553b2c71b2391e308f7c7ca27 (patch) | |
tree | 6601b69858140478c891da26504e3eef06307828 /comms | |
parent | Update to 0.3.3. TLS support has been added. (experimental) (diff) |
Add 'restart' and 'status' functionality.
Notes
Notes:
svn path=/head/; revision=35319
Diffstat (limited to 'comms')
-rw-r--r-- | comms/conserver/files/conserver.sh | 11 | ||||
-rw-r--r-- | comms/conserver/files/conserver.sh.in | 11 |
2 files changed, 20 insertions, 2 deletions
diff --git a/comms/conserver/files/conserver.sh b/comms/conserver/files/conserver.sh index 842c39e60400..cf27a4764ecf 100644 --- a/comms/conserver/files/conserver.sh +++ b/comms/conserver/files/conserver.sh @@ -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 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 |