tomcat=/opt/tomcat
startup=$tomcat/bin/startup.sh
shutdown=$tomcat/bin/shutdown.sh
export JAVA_HOME=/opt/java/
start(){
echo -n "Starting Tomcat service: "
#daemon -c
$startup
RETVAL=$?
echo
}
stop(){
echo -n "Stopping Tomcat service: "
$shutdown
RETVAL=$?
echo
}
restart(){
stop
start
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
# This doesn't work ;)
status tomcat
;;
restart)
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart}"
exit 1
esac
exit 0
Add new attachment
Only authorized users are allowed to upload new attachments.
«
This particular version was published on 14-Apr-2010 14:30 by Daloch.