svn commit: r424939 - in head/sysutils/cbsd: . files
Jason E. Hale
jhale at FreeBSD.org
Sun Oct 30 09:22:17 UTC 2016
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 at dussan.org>
Patched by: Oleg Ginzburg <olevole at 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 at 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"
More information about the svn-ports-all
mailing list