]> git.pld-linux.org Git - packages/mnogosearch.git/commitdiff
--starts up stored
authorhunter <hunter@pld-linux.org>
Tue, 4 Jun 2002 14:38:45 +0000 (14:38 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    mnogosearch-stored.init -> 1.1

mnogosearch-stored.init [new file with mode: 0644]

diff --git a/mnogosearch-stored.init b/mnogosearch-stored.init
new file mode 100644 (file)
index 0000000..3bb1136
--- /dev/null
@@ -0,0 +1,75 @@
+#!/bin/sh
+#
+# mnogosearch-stored   This shell script takes care of starting and stopping
+# stored (optional part of mnogosearch engine)
+#
+# description: stored is a deamon which stores gziped version of parsed 
+# documents (html pages, news atricles etc..) 
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+LOGFILE=/var/log/mnogosearch-stored
+
+# Get service config
+[ -f /etc/sysconfig/mnogosearch-stored ] && . /etc/sysconfig/mnogosearch-stored
+
+# Check that networking is up.
+if is_no "${NETWORKING}"; then
+       msg_Network_Down Mnogosearch-stored
+       exit 1
+fi
+
+RETVAL=0
+
+# See how we were called.
+case "$1" in
+  start)
+       # Check if the service is already running?
+       if [ ! -f /var/lock/subsys/mnogosearch-stored ]; then
+
+               # build aliases database
+               
+               msg_starting Mnogosearch-stored
+               busy
+               /usr/sbin/stored 2>&1 > $LOGFILE &
+               sleep 1
+
+               if ps ax | grep -v grep | grep -q stored
+               then
+                       deltext
+                       ok
+                       touch /var/lock/subsys/mnogosearch-stored
+               else
+                       deltext
+                       fail      
+                       RETVAL=1
+               fi
+       else
+               msg_Already_Running Mnogosearch-stored
+               exit 1
+       fi
+       ;;
+  stop)
+       # Stop daemons.
+       msg_stopping Mnogosearch-stored 
+       killproc stored
+       rm -f /var/lock/subsys/mnogosearch-stored
+       ;;
+       ;;
+  restart|reload)
+       $0 stop
+       $0 start
+       ;;
+  status)
+       status stored
+       ;;
+  *)
+       msg_Usage "$0 {start|stop|status|restart|reload}"
+       exit 1
+esac
+
+exit $RETVAL
This page took 0.068257 seconds and 4 git commands to generate.