ports/122741: Cannot restart openfire from cron

Alex Keda admin at lissyara.su
Mon Apr 14 05:30:02 UTC 2008


>Number:         122741
>Category:       ports
>Synopsis:       Cannot restart openfire from cron
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 14 05:30:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Alex Keda
>Release:        6.2-RELEASE
>Organization:
ussr
>Environment:
FreeBSD jabber.moskb.local 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 10:40:27 UTC 2007     root at dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
Two problems:
1. Cannot restart openfire using command:
3       3       *       *       6       /usr/local/etc/rc.d/openfire stop && sleep 10 && /usr/local/etc/rc.d/openfire start
because not all utilities contains in default PATH cron daemon

2. Not reading starup script otions
openfire_javargs=""
from /etc/rc.conf

>How-To-Repeat:
restart openfire from cron using
/usr/local/etc/rc.d/openfire stop && sleep 10 && /usr/local/etc/rc.d/openfire start
==========
set another value "openfire_javargs" in rc.conf and restart openfire:
openfire_javargs="-Xmx1536M"
>Fix:
see patch

Patch attached with submission follows:

--- openfire.in.orig	Mon Apr 14 09:07:07 2008
+++ openfire.in	Mon Apr 14 09:10:20 2008
@@ -22,6 +22,7 @@
 #               See java -h for available arguments.
 
 . %%RC_SUBR%%
+. /etc/rc.conf
 
 name="openfire"
 rcvar=${name}_enable
@@ -47,7 +48,7 @@
 if [ -f $pidfile ]; then
 	read rc_pid junk < $pidfile
 	if [ ! -z "$rc_pid" ]; then
-		procname=`ps -o command= $rc_pid | awk '{print $1 }'`
+		procname=`ps -o command= $rc_pid | /usr/bin/awk '{print $1 }'`
 	fi
 fi
 
@@ -59,8 +60,8 @@
 load_rc_config $name
 
 openfire_precmd() {
-        touch ${pidfile}
-        chown ${openfire_user}:${openfire_group} ${pidfile}
+        /usr/bin/touch ${pidfile}
+        /usr/sbin/chown ${openfire_user}:${openfire_group} ${pidfile}
 }
 
 openfire_status() {


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list