]> git.pld-linux.org Git - packages/aspseek.git/blob - aspseek.init
- converted to UTF-8
[packages/aspseek.git] / aspseek.init
1 #!/bin/sh
2 #
3 # aspseek       Aspseek Internet Search Engine
4 #
5 # chkconfig:    345 75 25
6 # description:  Advanced Internet search engine
7 # processname:  searchd
8
9 # Source function library
10 . /etc/rc.d/init.d/functions
11
12 # Get service config
13 [ -f /etc/sysconfig/aspseek ] && . /etc/sysconfig/aspseek
14
15 RETVAL=0
16 # See how we were called.
17 case "$1" in
18   start)
19         # Check if the service is already running?
20         if [ ! -f /var/lock/subsys/aspseek ]; then
21                 msg_starting "aspseek searchd"
22                 daemon --user aspseek /usr/sbin/searchd -D -l /var/log/aspseek.log
23                 RETVAL=$?
24                 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/aspseek
25         else
26                 msg_already_running "aspseek searchd"
27         fi
28         ;;
29   stop)
30         # Stop daemons.
31         if [ -f /var/lock/subsys/aspseek ]; then
32                 msg_stopping "aspseek searchd"
33                 killproc /usr/sbin/searchd
34                 rm -f /var/lock/subsys/aspseek
35         else
36                 msg_not_running "aspseek searchd"
37         fi
38         ;;
39   status)
40         status aspseek
41         exit $?
42         ;;
43   restart|force-reload)
44         $0 stop
45         $0 start
46         exit $?
47         ;;
48   *)
49         msg_usage "$0 {start|stop|restart|force-reload|status}"
50         exit 3
51         ;;
52 esac
53
54 exit $RETVAL
This page took 0.050158 seconds and 3 git commands to generate.