Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 15204 invoked from network); 13 Jan 2003 11:38:36 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 13 Jan 2003 11:38:36 -0000 Received: (qmail 10709 invoked by uid 97); 13 Jan 2003 11:39:36 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 10693 invoked by uid 97); 13 Jan 2003 11:39:36 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 10672 invoked by uid 98); 13 Jan 2003 11:39:35 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Date: Mon, 13 Jan 2003 11:38:13 +0000 From: Rasputin To: Tomcat Users List Subject: Re: Basic questions Message-ID: <20030113113813.GA18986@idoru.tenten> Reply-To: Rasputin References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N * jmong@adobe.com [0115 21:15]: > # run the following script > > #!/bin/sh > > JAVA_HOME=/usr/java > TOMCAT_HOME=/usr/local/tomcat > > su - myuser -c "${TOMCAT_HOME}/bin/startup.sh" This is pretty much what I do, only I find it's generally better not to set a CLASSPATH - tomcat sets up its own, I always found *un*setting it led to less confusion in the long run. The script above can also be used to start tomcat at boot time, since it safely su's if run as root. If you set the users home directory to whereever you installed tomcat, and 'chown -R myuser' it, that usually sorts out permissions. > a typical crontab entry > > 0 0 * * * cd /path/to/script ; ./restart_tomcat.sh > /var/log/myout.dat > > which says run at midnight every day. Only snags with that are: a) it tries to start tomcat each time it runs, without checking if it's already up. Probably a non-issue. b) it only runs every 24 hours! I'd whack that up to every 15 minutes, if there are stability issues with it. Can't say I'd see this as necessary though - if tomcat is crashing, that should be resolved, rather than this fix. > There are probably more elegant ways to do this but that should get you > started. -- Rasputin :: Jack of All Trades - Master of Nuns -- To unsubscribe, e-mail: For additional commands, e-mail: