| Server IP : 178.63.100.251 / Your IP : 216.73.216.228 Web Server : LiteSpeed System : Linux dobby.thevpsserver.com 4.18.0-553.16.1.lve.el8.x86_64 #1 SMP Tue Aug 13 17:45:03 UTC 2024 x86_64 User : truewayi ( 1855) PHP Version : 7.4.33 Disable Function : show_source,system,shell_exec,passthru,exec,popen,proc_open MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/cpanel/ea-tomcat85/bin/ |
Upload File : |
. /opt/cpanel/ea-tomcat85/bin/user-functions
. $HOME/ea-tomcat85/bin/setenv.sh
tomcat_pid() {
if [ -n "$CATALINA_PID" ] && [ -e $CATALINA_PID ]; then
cat $CATALINA_PID
fi
}
ERROR=0
case $1 in
start)
pid=$(tomcat_pid)
if [ -n "$pid" ] && ps --pid $pid 2>&1 1>/dev/null; then
echo -e "\e[00;33mTomcat is already running (pid: $pid)\e[00m"
ERROR=1
else
/opt/cpanel/ea-tomcat85/bin/user-startup.sh
fi
;;
stop)
pid=$(tomcat_pid)
if [ ! -n "$pid" ] || [ ! ps --pid $pid 2>&1 1>/dev/null ]; then
echo -e "\e[00;31mTomcat is already shutdown\e[00m"
ERROR=1
else
/opt/cpanel/ea-tomcat85/bin/user-shutdown.sh
fi
;;
restart|force-reload|reload)
pid=$(tomcat_pid)
if [ -n "$pid" ] && ps --pid $pid 2>&1 1>/dev/null; then
/opt/cpanel/ea-tomcat85/bin/user-shutdown.sh
fi
/opt/cpanel/ea-tomcat85/bin/user-startup.sh
;;
status|fullstatus)
pid=$(tomcat_pid)
if [ -f "$CATALINA_PID" ]; then
if ps --pid $pid 2>&1 1>/dev/null; then
echo -e "\e[00;32mTomcat is running!\e[00m"
ERROR=0
else
echo "$CATALINA_PID found, but $pid is not running"
ERROR=4
fi
else
echo -e "\e[00;31mTomcat is currently not running.\e[00m"
ERROR=3
fi
;;
*)
echo $"Usage: $0 {start|stop|restart|status|fullstatus}"
ERROR=2
esac
exit $ERROR