From owner-freebsd-java@FreeBSD.ORG Mon Mar 14 17:17:19 2005 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 05D7716A4CE for ; Mon, 14 Mar 2005 17:17:18 +0000 (GMT) Received: from ux11.ltcm.net (ux11.ltcm.net [64.215.98.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 331EC43D2F for ; Mon, 14 Mar 2005 17:17:18 +0000 (GMT) (envelope-from mipam@ibb.net) Received: from ux11.ltcm.net (mipam@localhost.ltcm.net [IPv6:::1]) by ux11.ltcm.net (8.12.9/8.12.9/UX11TT) with ESMTP id j2EHHGrU023952; Mon, 14 Mar 2005 18:17:16 +0100 (MET) Received: from localhost (mipam@localhost) by ux11.ltcm.net (8.12.9/8.12.9/Submit) with ESMTP id j2EHHE6Y010848; Mon, 14 Mar 2005 18:17:15 +0100 (MET) X-Authentication-Warning: ux11.ltcm.net: mipam owned process doing -bs Date: Mon, 14 Mar 2005 18:17:14 +0100 (MET) From: Mipam X-X-Sender: mipam@ux11.ltcm.net To: Thomas Lange In-Reply-To: <002e01c52891$c2d0a5f0$16b2a8c0@bubu> Message-ID: References: <002e01c52891$c2d0a5f0$16b2a8c0@bubu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-java@freebsd.org Subject: Re: tomcat50ctl start arguments X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2005 17:17:19 -0000 It complains that JAVA_HOME isn't defined when i adjust the script as below and remove /dev/null so i see output. So i guess tomcat50ctl fills in some variables needed to be set then? On Mon, 14 Mar 2005, Thomas Lange wrote: > > I wish to add some arguments to tomcat when it starts, > > for example, i wish to give -Xmx256M as argument to tomcat. > > How can i do this? > > You could edit "/usr/local/etc/rc.d/[..]jakarta-tomcat50.sh" as follows to > make it use the tomcat start and stop scripts and then edit them or set > environment variables to use your custom jvm settings. > > case "$1" in > start) > echo -n ' ' > truncate -s 0 /var/run/tomcat50.pid > chown www:www /var/run/tomcat50.pid > chmod 600 /var/run/tomcat50.pid > su -f -m www -c "exec > /usr/local/jakarta-tomcat5.0/bin/startup.sh" >/dev/null && echo -n > 'tomcat50' > # su -f -m www -c "exec /usr/local/bin/tomcat50ctl start" > >/dev/null && echo -n 'tomcat50' > ;; > stop) > echo -n ' ' > chown www:www /var/run/tomcat50.pid > chmod 600 /var/run/tomcat50.pid > su -f -m www -c "exec > /usr/local/jakarta-tomcat5.0/bin/shutdown.sh" >/dev/null 2>&1 ; echo -n > 'tomcat50' > # su -f -m www -c "exec /usr/local/bin/tomcat50ctl stop" > >/dev/null 2>&1 ; echo -n 'tomcat50' > ;; > *) > echo "" > echo "Usage: ${MYSELF} { start | stop }" > echo "" > exit 64 > ;; > esac >