]> git.pld-linux.org Git - packages/aspseek.git/blob - aspseek.init
- use %useradd/%groupadd macros
[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 network config
13 . /etc/sysconfig/network
14
15 # Get service config
16 [ -f /etc/sysconfig/aspseek ] && . /etc/sysconfig/aspseek
17
18 RETVAL=0
19 # See how we were called.
20 case "$1" in
21   start)
22         # Check if the service is already running?
23         if [ ! -f /var/lock/subsys/aspseek ]; then
24                 msg_starting "aspseek searchd"
25                 daemon --user aspseek /usr/sbin/searchd -D -l /var/log/aspseek.log
26                 RETVAL=$?
27                 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/aspseek
28         else
29                 msg_already_running "aspseek searchd"
30         fi
31         ;;
32   stop)
33         # Stop daemons.
34         if [ -f /var/lock/subsys/aspseek ]; then
35                 msg_stopping "aspseek searchd"
36                 killproc /usr/sbin/searchd
37                 rm -f /var/lock/subsys/aspseek
38         else
39                 msg_not_running "aspseek searchd"
40         fi
41         ;;
42   status)
43         status aspseek
44         exit $?
45         ;;
46   restart|force-reload)
47         $0 stop
48         $0 start
49         exit $?
50         ;;
51   *)
52         msg_usage "$0 {start|stop|restart|force-reload|status}"
53         exit 3
54         ;;
55 esac
56
57 exit $RETVAL
This page took 0.07501 seconds and 3 git commands to generate.