From owner-freebsd-java@FreeBSD.ORG Mon Mar 14 12:30:22 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 812DF16A4CE for ; Mon, 14 Mar 2005 12:30:22 +0000 (GMT) Received: from lowrider.smega.com (lowrider.smega.com [82.149.226.102]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0101343D54 for ; Mon, 14 Mar 2005 12:30:22 +0000 (GMT) (envelope-from freebja@wie-ich.de) Received: from p5085867c.dip0.t-ipconnect.de ([80.133.134.124] helo=bubu) by lowrider.smega.com with esmtpa (Exim 4.50 (FreeBSD)) id 1DAoiD-000NGb-FT; Mon, 14 Mar 2005 13:30:21 +0100 Message-ID: <002e01c52891$c2d0a5f0$16b2a8c0@bubu> From: "Thomas Lange" To: "Mipam" , References: Date: Mon, 14 Mar 2005 13:31:34 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 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 12:30:22 -0000 > 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