#!/bin/sh
#
# Startup script for Tomcat
JAVA_HOME=/opt/local/jdk1.6
export JAVA_HOME
start_tomcat=/opt/local/tomcat/bin/startup.sh
stop_tomcat=/opt/locat/tomcat/bin/shutdown.sh
start() {
echo -n "Starting tomcat: "
su - tomcat -c ${start_tomcat}
echo "done."
}
stop() {
echo -n "Shutting down tomcat: "
su - tomcat -c ${stop_tomcat}
echo "done."
}
# See how we were called
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 10
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
esac
exit 0
Ubah permision agar executable kemudian buat Softlink di rc0, rc2 dan r3
# chmod a+x /etc/init.d/tomcat
# ln -s /etc/init.d/tomcat /etc/rc0.d/K01tomcat
# ln -s /etc/init.d/tomcat /etc/rc2.d/K01tomcat
# ln -s /etc/init.d/tomcat /etc/rc2.d/S71tomcat
# ln -s /etc/init.d/tomcat /etc/rc3.d/K01tomcat
# ln -s /etc/init.d/tomcat /etc/rc3.d/S71tomcat
No comments:
Post a Comment