# Check that networking is up.
if is_yes "${NETWORKING}"; then
- if [ ! -f /var/lock/subsys/network -a != stop -a != status ]; then
- # nls "ERROR: Networking is down. %s can't be run." <service>
+ if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
msg_network_down tomcat
exit 1
fi
start)
# Check if the service is already running?
if [ ! -f /var/lock/subsys/tomcat ]; then
- # show "Starting %s service" tomcat
msg_starting tomcat
busy
su - http -s /bin/sh -c /usr/lib/tomcat/bin/startup.sh >/dev/null 2>&1
[ $RETVAL -eq 0 ] && ok || fail
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/tomcat
else
- # show "%s service is already running." tomcat
msg_already_running tomcat
fi
;;
stop)
if [ -f /var/lock/subsys/tomcat ]; then
# Stop daemons.
- # show "Stopping %s service" tomcat
msg_stopping tomcat
busy
su - http -s /bin/sh -c /usr/lib/tomcat/bin/shutdown.sh >/dev/null 2>&1
[ $? -eq 0 ] && ok || fail
rm -f /var/lock/subsys/tomcat
else
- # show "%s service is not running." tomcat
msg_not_running tomcat
- fi
+ fi
;;
restart|force-reload)
$0 stop
RETVAL=0
;;
*)
- # show "Usage: %s {start|stop|restart|force-reload|status}"
msg_usage "$0 {start|stop|restart|force-reload|status}"
exit 3
esac