e052536
--- condor-6.9.5-original/condor.init	2007-11-29 12:47:58.000000000 -0600
e052536
+++ condor-6.9.5/condor.init	2007-11-29 12:47:31.000000000 -0600
e052536
@@ -0,0 +1,110 @@
e052536
+#!/bin/bash
e052536
+#
e052536
+# condor	This script allows for starting and stopping Condor.
e052536
+#
e052536
+# chkconfig: 345 90 10
e052536
+# description: Condor is a high throughput computing batch processing
e052536
+# 	       platform.
e052536
+# processname: condor_master
e052536
+# config: /etc/condor/condor_config
e052536
+# pidfile: /var/run/condor_master.pid
e052536
+
e052536
+### BEGIN INIT INFO
e052536
+# Provides: condor_master, Condor daemon manager
e052536
+# Required-Start: $local_fs $network
e052536
+# Required-Stop: $local_fs $network
e052536
+# Default-Start: 3 4 5
e052536
+# Default-Stop: 0 1 2 6
e052536
+# Short-Description: start and stop Condor
e052536
+# Description: Condor HTC computing platform
e052536
+### END INIT INFO
e052536
+
e052536
+# The program being managed
e052536
+prog=condor_master
e052536
+
e052536
+lockfile=/var/lock/subsys/$prog
e052536
+
e052536
+# Source function library
e052536
+. /etc/init.d/functions
e052536
+
e052536
+# Source networking configuration
e052536
+[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network
e052536
+
e052536
+# Source Condor configuration
e052536
+[ -f /etc/sysconfig/condor ] && . /etc/sysconfig/condor
e052536
+
e052536
+# Report that the underlying program does not exist
e052536
+[ -f /usr/sbin/$prog ] || exit 5
e052536
+
e052536
+# Check that networking is up
e052536
+[ "${NETWORKING}" = "no" ] && exit 1
e052536
+
e052536
+
e052536
+start() {
e052536
+    echo -n $"Starting Condor daemons: "
e052536
+    daemon --check $prog $prog
e052536
+    RETVAL=$?
e052536
+    echo
e052536
+    [ $RETVAL -eq 0 ] && touch $lockfile
e052536
+    return $RETVAL
e052536
+}
e052536
+
e052536
+stop() {
e052536
+    echo -n $"Stopping Condor daemons: "
e052536
+    killproc $prog
e052536
+    RETVAL=$?
e052536
+    echo
e052536
+    [ $RETVAL -eq 0 ] && rm -f $lockfile
e052536
+    return $RETVAL
e052536
+}
e052536
+
e052536
+reload() {
e052536
+    echo -n $"Reloading Condor daemons: "
e052536
+    condor_reconfig # Always returns 0?
e052536
+    RETVAL=$?
e052536
+    echo
e052536
+    return $RETVAL
e052536
+}
e052536
+
e052536
+
e052536
+# 0=running, 1=stopped & pid file exists, 2=stopped & subsys locked, 3=stopped
e052536
+status $prog &>/dev/null
e052536
+running=$?
e052536
+
e052536
+case "$1" in
e052536
+    start)
e052536
+	[ $running -eq 0 ] && exit 0
e052536
+	start
e052536
+	RETVAL=$?
e052536
+	;;
e052536
+    stop)
e052536
+	[ $running -eq 0 ] || exit 0
e052536
+	stop
e052536
+	RETVAL=$?
e052536
+	;;
e052536
+    restart)
e052536
+	[ $running -eq 0 ] && stop
e052536
+	start
e052536
+	RETVAL=$?
e052536
+	;;
e052536
+    try-restart)
e052536
+	[ $running -eq 0 ] || exit 0
e052536
+	stop
e052536
+	start
e052536
+	RETVAL=$?
e052536
+	;;
e052536
+    reload|force-reload)
e052536
+	[ $running -eq 0 ] || exit 7
e052536
+	reload
e052536
+	RETVAL=$?
e052536
+	;;
e052536
+    status)
e052536
+	status $prog
e052536
+	RETVAL=$?
e052536
+	;;
e052536
+    *)
e052536
+	echo $"Usage: $0 {start|stop|restart|try-restart|reload|force-reload|status}"
e052536
+	RETVAL=2
e052536
+esac
e052536
+
e052536
+exit $RETVAL