LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   execute my script before tomcat at bootup (https://www.linuxquestions.org/questions/linux-newbie-8/execute-my-script-before-tomcat-at-bootup-945773/)

fachhoch@gmail.com 05-18-2012 02:47 PM

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

fachhoch@gmail.com 05-18-2012 03:14 PM

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.


All times are GMT -5. The time now is 08:02 PM.