Date: Mon, 14 Apr 2008 05:29:29 GMT From: Alex Keda <admin@lissyara.su> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/122741: Cannot restart openfire from cron Message-ID: <200804140529.m3E5TTjm021959@www.freebsd.org> Resent-Message-ID: <200804140530.m3E5U1SG044195@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200804140529.m3E5TTjm021959>