This is a discussion on Tomcat shell script cron job to restart server within the Shell scripting forums, part of the Development/Scripting category; i am suffering through a shell script prob. when i am running my shell script using "sh" it is working ...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
|||
|
i am suffering through a shell script prob. when i am running my shell script using "sh" it is working fine, but when i put that file inn crontab, it's stops running.
i am giving u my script, actually this script will stop and aging restart the tomcat server. if [ `netstat -nlp | grep :3128 | wc -l` = 1 ]; then { echo live kill -9 `ps -ef|grep java|awk '{print $2}'` } fi sleep 5 cd /usr/local/apache-tomcat-6.0.13/ sh ./bin/startup.sh > err.txt in err.txt i got this message Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable is needed to run this program i just check the startup.sh script i found that is starting with #!/bin/sh is this a problem, well i am inn /bin/bash, but this doesn't helped me out. pl. help me out of this problem Thanks in Advance Last edited by kasimani; 05-02-2008 at 11:23 AM. Reason: symble |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| cronjobs , crontab , linux , redhat , shell script , tomcat |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Nagios on tomcat? | Vince-0 | Linux software | 0 | 04-22-2008 01:30 PM |
| Shell Script to Automatically Delete a File via Cron Job | kakarla | Shell scripting | 2 | 01-29-2008 08:54 AM |
| Shell script to perform operation on remote server | vivekv | Shell scripting | 3 | 10-24-2007 12:10 AM |
| writing a shell script to find out my shell name | jaymob123 | Shell scripting | 1 | 10-08-2007 12:36 AM |
| Require Shell Script Which sends all server info on mail | puppen | Linux software | 3 | 10-25-2006 08:07 PM |