]>
Commit | Line | Data |
---|---|---|
d7f4e7e8 AM |
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 | # See how we were called. | |
19 | case "$1" in | |
20 | start) | |
21 | # Check if the service is already running? | |
22 | if [ ! -f /var/lock/subsys/aspseek ]; then | |
23 | msg_starting "aspseek searchd" | |
24 | daemon --user aspseek /usr/sbin/searchd -D -l /var/log/aspseek.log | |
25 | RETVAL=$? | |
26 | [ $RETVAL -eq 0 ] && touch /var/lock/subsys/aspseek | |
27 | else | |
28 | msg_already_running "aspseek searchd" | |
29 | exit 1 | |
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 | exit 1 | |
41 | fi | |
42 | ;; | |
43 | status) | |
44 | status aspseek | |
45 | exit $? | |
46 | ;; | |
47 | restart|reload) | |
48 | $0 stop | |
49 | $0 start | |
50 | ;; | |
51 | *) | |
52 | msg_usage "$0 {start|stop|restart|status}" | |
53 | exit 1 | |
54 | ;; | |
55 | esac | |
56 | ||
57 | exit $RETVAL |