diff options
Diffstat (limited to 'sysutils/cbsd')
-rw-r--r-- | sysutils/cbsd/Makefile | 1 | ||||
-rw-r--r-- | sysutils/cbsd/files/cbsdd.in | 22 |
2 files changed, 21 insertions, 2 deletions
diff --git a/sysutils/cbsd/Makefile b/sysutils/cbsd/Makefile index fe805e55d879..78f8d21845a6 100644 --- a/sysutils/cbsd/Makefile +++ b/sysutils/cbsd/Makefile @@ -2,6 +2,7 @@ PORTNAME= cbsd PORTVERSION= 11.0.4 +PORTREVISION= 1 CATEGORIES= sysutils MAINTAINER= olevole@olevole.ru diff --git a/sysutils/cbsd/files/cbsdd.in b/sysutils/cbsd/files/cbsdd.in index d4aa6072b702..e21ba93bf724 100644 --- a/sysutils/cbsd/files/cbsdd.in +++ b/sysutils/cbsd/files/cbsdd.in @@ -48,6 +48,7 @@ fi start_precmd=${name}_prestart stop_precmd=${name}_prestop stop_cmd=${name}_stop +status_cmd="${name}_status" reload_cmd=${name}_reload extra_commands="reload" @@ -79,14 +80,31 @@ cbsdd_prestop() cbsdd_stop() { - [ -f "${pidfile}" ] && kill -9 $( /bin/cat ${pidfile} ) + if [ -f "${pidfile}" ]; then + kill -9 $( /bin/cat ${pidfile} ) + /bin/rm -f ${pidfile} + fi } cbsdd_reload() { - [ -f "${pidfile}" ] && kill -9 $( /bin/cat ${pidfile} ) > /dev/null 2>&1 + if [ -f "${pidfile}" ]; then + kill -9 $( /bin/cat ${pidfile} ) > /dev/null 2>&1 + /bin/rm -f ${pidfile} + fi run_rc_command "start" exit 0 } +cbsdd_status() +{ + if [ -f "${pidfile}" ]; then + pids=$( /bin/cat ${pidfile} ) + echo "${name} is running as pid ${pids}." + else + echo "${name} is not running." + return 1 + fi +} + run_rc_command "$1" |