AIX - Restarting proccesses and removing files
Posted on 2012-08-24
I'm currently writing a script that stops and starts tomcat, but also check if TomcatApp is still running before it starts it up. Also, removes tomcat tmp files older than 24 hours.
find /usr/tomcat/TomcatApp/tmp -type f -mtime +1 -print | xargs rm (is this correct?)
Help with the If, Then, Else statement??? ps -ef |grep TomcatApp, if its still running, kill it, if its not running then start it up using /usr/tomcat/TomcatApp/bin/startup.sh