SOURCES: nexus.init (NEW) - initial release
pawelz
pawelz at pld-linux.org
Fri Oct 24 16:41:22 CEST 2008
Author: pawelz Date: Fri Oct 24 14:41:22 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- initial release
---- Files affected:
SOURCES:
nexus.init (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/nexus.init
diff -u /dev/null SOURCES/nexus.init:1.1
--- /dev/null Fri Oct 24 16:41:22 2008
+++ SOURCES/nexus.init Fri Oct 24 16:41:16 2008
@@ -0,0 +1,80 @@
+#!/bin/sh
+#
+# proftpd Maven Repository Manager
+#
+# chkconfig: 345 85 15
+# description: Maven Repository Manager
+# processname: nexus
+# pidfile: /var/run/nexus.pid
+# config: /etc/nexus/wrapper.conf
+
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Get service config
+[ -f /etc/sysconfig/nexus ] && . /etc/sysconfig/nexus
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+ if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
+ msg_network_down nexus
+ exit 1
+ fi
+else
+ exit 0
+fi
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ # Check if the service is already running?
+ if [ ! -f /var/lock/subsys/nexus ]; then
+ msg_starting nexus
+ su nexus -s /bin/sh -c "/usr/sbin/java-service-wrapper /var/lib/nexus/conf/wrapper.conf wrapper.syslog.ident=nexus wrapper.daemonize=TRUE wrapper.pidfile=/var/lib/nexus/nexus.pid"
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nexus
+ else
+ msg_already_running nexus
+ fi
+ ;;
+ console)
+ # Check if the service is already running?
+ if [ ! -f /var/lock/subsys/nexus ]; then
+ msg_starting nexus
+ touch /var/lock/subsys/nexus
+ su nexus -s /bin/sh -c "/usr/sbin/java-service-wrapper /var/lib/nexus/conf/wrapper.conf wrapper.syslog.ident=nexus wrapper.pidfile=/var/lib/nexus/nexus.pid"
+ rm -f /var/lock/subsys/nexus /var/run/nexus.pid > /dev/null 2>&1
+ else
+ msg_already_running nexus
+ fi
+ ;;
+ stop)
+ # Stop daemons.
+ if [ -f /var/lock/subsys/proftpd ]; then
+ msg_stopping nexus
+ killproc nexus
+ rm -f /var/lock/subsys/nexus /var/run/nexus.pid > /dev/null 2>&1
+ else
+ msg_not_running nexus
+ fi
+ ;;
+ status)
+ status nexus
+ exit $?
+ ;;
+ restart|force-reload)
+ $0 stop
+ $0 start
+ exit $?
+ ;;
+ *)
+ msg_usage "$0 {start|console|stop|restart|force-reload|status}"
+ exit 3
+esac
+
+exit $RETVAL
================================================================
More information about the pld-cvs-commit
mailing list