summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElan Ruusamäe2009-03-10 14:06:17 (GMT)
committercvs2git2012-06-24 12:13:13 (GMT)
commit306fac37d1f5456d1f890d27227dabd87ee5a811 (patch)
tree6782562518219d302ad681b9dd01b81f5a162dbe
parenta472fe7a2940d65a5011f9ea2158abc8dd93d446 (diff)
downloadApacheJServ-306fac37d1f5456d1f890d27227dabd87ee5a811.zip
ApacheJServ-306fac37d1f5456d1f890d27227dabd87ee5a811.tar.gz
- add try-restart/force-reload, cosmetics
Changed files: ApacheJServ.init -> 1.10
-rw-r--r--ApacheJServ.init30
1 files changed, 23 insertions, 7 deletions
diff --git a/ApacheJServ.init b/ApacheJServ.init
index 295e8f5..8abc66e 100644
--- a/ApacheJServ.init
+++ b/ApacheJServ.init
@@ -4,7 +4,7 @@
#
# chkconfig: 345 80 20
#
-# description: jserv ApacheJServ standalone process
+# description: jserv Apache JServ standalone process
#
# $Id$
@@ -23,7 +23,7 @@ JSERV_CLASS=org.apache.jserv.JServ
# Check that networking is up.
if is_yes "${NETWORKING}"; then
if [ ! -f /var/lock/subsys/network ]; then
- msg_network_down ApacheJServ
+ msg_network_down "Apache JServ"
exit 1
fi
else
@@ -46,7 +46,7 @@ getconfig() {
start() {
# Check if the service is already running?
if [ ! -f /var/lock/subsys/jserv ]; then
- msg_starting ApacheJServ
+ msg_starting "Apache JServ"
getconfig || exit 1
/usr/bin/setsid start-stop-daemon --start \
--exec /usr/bin/env \
@@ -64,18 +64,28 @@ start() {
fail
fi
else
- msg_already_running ApacheJServ
+ msg_already_running "Apache JServ"
fi
}
stop() {
if [ -f /var/lock/subsys/jserv ]; then
# Stop daemons.
- msg_stopping ApacheJServ
+ msg_stopping "Apache JServ"
killproc --pidfile jserv.pid jserv
rm -f /var/lock/subsys/jserv
else
- msg_not_running ApacheJServ
+ msg_not_running "Apache JServ"
+ fi
+}
+
+condrestart() {
+ if [ -f /var/lock/subsys/jserv ]; then
+ stop
+ start
+ else
+ msg_not_running "Apache JServ"
+ RETVAL=$1
fi
}
@@ -91,12 +101,18 @@ case "$1" in
stop
start
;;
+ try-restart)
+ condrestart 0
+ ;;
+ force-reload)
+ condrestart 7
+ ;;
status)
status jserv java
RETVAL=$?
;;
*)
- msg_usage "$0 {start|stop|restart|status}"
+ msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
exit 3
esac