Date: Sun, 30 Oct 2016 09:22:15 +0000 (UTC) From: "Jason E. Hale" <jhale@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r424939 - in head/sysutils/cbsd: . files Message-ID: <201610300922.u9U9MFZO060895@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhale Date: Sun Oct 30 09:22:15 2016 New Revision: 424939 URL: https://svnweb.freebsd.org/changeset/ports/424939 Log: Fix rc.d script for status query Bump PORTREVISION so new script is installed PR: 213707 Reported by: Dusan Vejnovic <freebsd@dussan.org> Patched by: Oleg Ginzburg <olevole@olevole.ru> (maintainer) Modified: head/sysutils/cbsd/Makefile head/sysutils/cbsd/files/cbsdd.in Modified: head/sysutils/cbsd/Makefile ============================================================================== --- head/sysutils/cbsd/Makefile Sun Oct 30 09:04:18 2016 (r424938) +++ head/sysutils/cbsd/Makefile Sun Oct 30 09:22:15 2016 (r424939) @@ -2,6 +2,7 @@ PORTNAME= cbsd PORTVERSION= 11.0.4 +PORTREVISION= 1 CATEGORIES= sysutils MAINTAINER= olevole@olevole.ru Modified: head/sysutils/cbsd/files/cbsdd.in ============================================================================== --- head/sysutils/cbsd/files/cbsdd.in Sun Oct 30 09:04:18 2016 (r424938) +++ head/sysutils/cbsd/files/cbsdd.in Sun Oct 30 09:22:15 2016 (r424939) @@ -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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610300922.u9U9MFZO060895>