]> git.pld-linux.org Git - packages/crossfire.git/commitdiff
- crossfire init & sysconfig
authorJacek Konieczny <jajcus@pld-linux.org>
Mon, 29 Jan 2001 10:21:03 +0000 (10:21 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    crossfire.init -> 1.1
    crossfire.sysconfig -> 1.1

crossfire.init [new file with mode: 0644]
crossfire.sysconfig [new file with mode: 0644]

diff --git a/crossfire.init b/crossfire.init
new file mode 100644 (file)
index 0000000..aa3adfa
--- /dev/null
@@ -0,0 +1,72 @@
+#!/bin/sh
+#
+# chkconfig:   345 98 03
+# description: Starts and stops the Crossfire server 
+#
+
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Source networking configuration.
+. /etc/sysconfig/network
+
+# Demon specified configuration.
+. /etc/sysconfig/crossfire
+
+# Check that networking is up.
+if is_no "${NETWORKING}"; then
+        msg_Network_Down crossfire
+        exit 1
+fi
+
+TMPDIR="/tmp"; export TMPDIR
+cd /
+
+case "$1" in
+    start)
+        if [ ! -f /var/lock/subsys/crossfire ]; then
+               msg_starting crossfire
+               daemon "su games -s /bin/sh -c '/usr/X11R6/bin/crossloop >/dev/null 2>&1 &'"
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/crossfire
+        else
+                msg_Already_Running crossfire
+                exit 1
+        fi
+       ;;
+    stop)
+        if [ -f /var/lock/subsys/crossfire ]; then
+                msg_stopping crossloop
+               killproc crossloop
+                msg_stopping crossfire
+               killproc crossfire
+               rm -f /var/lock/subsys/crossfire >/dev/null 2>&1
+        else
+                msg_Not_Running crossfire
+                exit 1
+        fi
+       ;;
+   status)
+       status crossfire
+       status crossloop
+       exit $?
+       ;;
+  restart)
+       $0 stop
+       $0 start
+       ;;
+  reload)
+       if [ -f /var/lock/subsys/crossfire ]; then
+               msg_reloading crossfire
+               killproc crossfire
+       else
+               msg_Not_Running crossfire
+               exit 1
+        fi
+       ;;
+  *)
+       msg_Usage "$0 {start|stop|restart|reload|status}"
+       exit 1
+esac
diff --git a/crossfire.sysconfig b/crossfire.sysconfig
new file mode 100644 (file)
index 0000000..7297377
--- /dev/null
@@ -0,0 +1,4 @@
+# Customized setings for samba
+
+# Define nice level for samba & config 
+SERVICE_RUN_NICE_LEVEL="+5"
This page took 0.215322 seconds and 4 git commands to generate.