]> git.pld-linux.org Git - packages/mnogosearch.git/blame - mnogosearch-stored.init
- noted download URL
[packages/mnogosearch.git] / mnogosearch-stored.init
CommitLineData
9c0defbc 1#!/bin/sh
2#
3# mnogosearch-stored This shell script takes care of starting and stopping
4# stored (optional part of mnogosearch engine)
5#
6666f96f 6# description: stored is a deamon which stores gziped version of parsed
7# documents (html pages, news atricles etc..)
148604ff 8#
6666f96f 9# chkconfig: 345 86 14
10# description: Stored is used to make documents excerpts for search results \
11# and for storing compressed copies of indexed documents.
9c0defbc 12
13# Source function library
14. /etc/rc.d/init.d/functions
15
16# Get network config
17. /etc/sysconfig/network
18
19LOGFILE=/var/log/mnogosearch-stored
20
21# Get service config
22[ -f /etc/sysconfig/mnogosearch-stored ] && . /etc/sysconfig/mnogosearch-stored
23
24# Check that networking is up.
6666f96f 25if is_yes "${NETWORKING}"; then
fc03769d 26 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
6666f96f 27 msg_network_down Mnogosearch-stored
28 exit 1
29 fi
30else
31 exit 0
9c0defbc 32fi
33
34RETVAL=0
9c0defbc 35# See how we were called.
36case "$1" in
37 start)
38 # Check if the service is already running?
39 if [ ! -f /var/lock/subsys/mnogosearch-stored ]; then
40
41 # build aliases database
42
43 msg_starting Mnogosearch-stored
44 busy
45 /usr/sbin/stored 2>&1 > $LOGFILE &
46 sleep 1
47
48 if ps ax | grep -v grep | grep -q stored
49 then
9c0defbc 50 ok
51 touch /var/lock/subsys/mnogosearch-stored
52 else
6666f96f 53 fail
9c0defbc 54 RETVAL=1
55 fi
56 else
6666f96f 57 msg_already_running Mnogosearch-stored
9c0defbc 58 fi
59 ;;
60 stop)
6666f96f 61 if [ -f /var/lock/subsys/mnogosearch-stored ]; then
62 # Stop daemons.
63 msg_stopping Mnogosearch-stored
64 killproc stored
65 rm -f /var/lock/subsys/mnogosearch-stored
66 else
67 msg_not_running Mnogosearch-stored
6666f96f 68 fi
9c0defbc 69 ;;
4d2d3070 70 restart|force-reload)
6666f96f 71 $0 stop
9c0defbc 72 $0 start
4d2d3070 73 exit $?
9c0defbc 74 ;;
75 status)
6666f96f 76 status stored
4d2d3070 77 exit $?
9c0defbc 78 ;;
79 *)
4d2d3070 80 msg_usage "$0 {start|stop|restart|force-reload|status}"
81 exit 3
9c0defbc 82esac
83
84exit $RETVAL
This page took 0.06097 seconds and 4 git commands to generate.