]> git.pld-linux.org Git - packages/freedt.git/commitdiff
- new
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 1 Jan 2004 17:35:21 +0000 (17:35 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    freedt.init -> 1.1
    freedt.sysconfig -> 1.1

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

diff --git a/freedt.init b/freedt.init
new file mode 100644 (file)
index 0000000..88a9f51
--- /dev/null
@@ -0,0 +1,80 @@
+#!/bin/sh
+#
+# svscan       svscan (scan and run services)
+#
+# chkconfig:   345 14 89       
+#
+# description: svscan (scan and run services) is a server part of the daemontools suite.
+#
+# id:          $Id$
+#
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Get service config
+[ -f /etc/sysconfig/svscan ] && . /etc/sysconfig/svscan
+
+# 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 svscan
+               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/svscan ]; then
+               msg_starting svscan;
+               busy
+               # we can't get status report from background job
+               # but we can only do simple file check
+               if [ -w $SVSCAN_DIR ]; then
+                       svscan $SVSCAN_DIR &
+                       ok
+               else
+                       fail
+                       echo $(nls "Missing service directory")'!'
+                       nls "Create %s first." "$SVSCAN_DIR"
+                       RETVAL=1
+               fi
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/svscan
+       else
+               msg_already_running svscan
+       fi
+       ;;
+  stop)
+       if [ -f /var/lock/subsys/svscan ]; then
+               msg_stopping svscan
+               killproc svscan
+               svc -d -x $SVSCAN_DIR/* \
+                   $(find $SVSCAN_DIR/* -maxdepth 0 -follow -perm -1000|sed s-\$-/log-)
+               rm -f /var/run/svscan.pid /var/lock/subsys/svscan >/dev/null 2>&1
+       else
+               msg_not_running svscan
+       fi      
+       ;;
+  restart|force-reload)
+       $0 stop
+       $0 start
+       exit $?
+       ;;
+  status)
+       status svscan
+       exit $?
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|force-reload|status}"
+       exit 3
+esac
+
+exit $RETVAL
diff --git a/freedt.sysconfig b/freedt.sysconfig
new file mode 100644 (file)
index 0000000..06c7a18
--- /dev/null
@@ -0,0 +1,2 @@
+# location of svscan service (directory):
+SVSCAN_DIR="/service"
This page took 0.069558 seconds and 4 git commands to generate.