]> git.pld-linux.org Git - packages/ConferenceRoom.git/commitdiff
- save work from 2007-02-28
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 17 Mar 2008 05:39:13 +0000 (05:39 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    cr.init -> 1.1

cr.init [new file with mode: 0755]

diff --git a/cr.init b/cr.init
new file mode 100755 (executable)
index 0000000..51f88b6
--- /dev/null
+++ b/cr.init
@@ -0,0 +1,89 @@
+#!/bin/sh
+#
+# cr   conferenceroom ircd service
+#
+# chkconfig:   345 11 89
+#
+# description: conferenceroom ircd service
+#
+# $Id$
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+SERVICES="cr ws sv"
+PROGDIR=/usr/lib/cr
+
+# Get service config - may override defaults
+[ -f /etc/sysconfig/cr ] && . /etc/sysconfig/cr
+
+# 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 cr
+               exit 1
+       fi
+else
+       exit 0
+fi
+
+start() {
+       # Check if the service is already running?
+       if [ ! -f /var/lock/subsys/cr ]; then
+               msg_starting "Conference Room IRCD"
+               set -x
+               daemon /usr/lib/cr/programs/launcher /usr/lib/cr $SERVICES
+#              daemon /usr/lib/cr/programs/launcher /etc/cr $SERVICES
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/cr
+       else
+               msg_already_running "Conference Room IRCD"
+       fi
+}
+
+stop() {
+       if [ -f /var/lock/subsys/cr ]; then
+               # Stop daemons.
+               msg_stopping "Conference Room IRCD"
+               killproc ConfRoom
+               killproc WMws
+#              set -x
+#              cd /usr/lib/cr
+#              /usr/lib/cr/programs/ConfRoom -stop
+#              rc=$?
+#              /usr/lib/cr/programs/WMws -stop
+#              rc=$((rc + $?))
+#              [ "$rc" = 0 ] && ok || fail
+               rm -f /var/lock/subsys/cr
+       else
+               msg_not_running "Conference Room IRCD"
+       fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  restart)
+       stop
+       start
+       exit $?
+       ;;
+  status)
+       status cr
+       RETVAL=$?
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|status}"
+       exit 3
+esac
+
+exit $RETVAL
This page took 0.075305 seconds and 4 git commands to generate.