LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-18-2012, 01:47 PM   #1
fachhoch@gmail.com
Member
 
Registered: Apr 2010
Posts: 82

Rep: Reputation: 1
execute my script before tomcat at bootup


I want to add a script to be called before the tomcat is started up (starting tomcat is also a script )

I want tomcat script to depend on my scrit only at boot time.
So I cannot change it in tomcat script , please advice me how to tell linux to call my script before tomcat script is called ,both my scripts are added to chkconfg
 
Old 05-18-2012, 02:14 PM   #2
fachhoch@gmail.com
Member
 
Registered: Apr 2010
Posts: 82

Original Poster
Rep: Reputation: 1
I wrote my script


Code:
#!/bin/sh 
#chkconfig: 345 99 10 
#description:  auto start-stop script. 


case $1 in 
start)

rm -rf /opt/tomcat/current/webapps/artms.war

wget -O /opt/tomcat/current/webapps/artms.war  https://blahblah/blahblah/artms.war



chown -R tomcat /opt/tomcat/current/webapps/artms.war



chgrp  -R tomcat /opt/tomcat/current/webapps/artms.war

;;
stop)
;;
what does this line say #chkconfig: 345 99 10 I copied it from some other script what should the actula value , I want this to called before a script tomcat

please advise.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot execute rc.4d, Slackware 12, bootup annihilan Slackware 5 07-29-2008 10:02 PM
Running tomcat & postgres each bootup crash_override_me Linux - Server 5 06-16-2007 07:27 PM
Add/remove programs that execute on bootup c_olin3404 Debian 1 09-07-2005 02:54 AM
TOMCAT init script not working on startup -- tomcat 4.x / Mandrake Linux 8.0 jmartinph Mandriva 0 03-08-2004 01:31 AM
Bootup error " INIT: Cannot execute .... Sifvion Slackware 2 10-02-2003 11:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration