]>
Commit | Line | Data |
---|---|---|
98d873eb | 1 | #! /bin/sh |
2 | # | |
3 | # innd InterNet News System | |
4 | # | |
5 | # chkconfig: 345 95 05 | |
6 | # description: inn is the most popular server for Usenet news. It allows \ | |
7 | # you to setup local news servers. It can be difficult to \ | |
8 | # set up properly though, so be sure to read /usr/doc/inn* \ | |
9 | # before trying. | |
10 | ||
11 | # Source function library. | |
12 | . /etc/rc.d/init.d/functions | |
13 | ||
14 | # Source networking configuration. | |
15 | . /etc/sysconfig/network | |
16 | ||
17 | # Daemon specific | |
18 | . /usr/share/news/innshellvars | |
19 | ||
20 | # Check that networking is up. | |
21 | [ "${NETWORKING}" = "no" ] && exit 0 | |
22 | ||
23 | # See how we were called. | |
24 | case "$1" in | |
25 | start) | |
26 | if [ ! -f /var/lock/subsys/crond ]; then | |
27 | if [ ! -f ${SERVERPID} ] ; then | |
28 | show Starting INN service | |
29 | daemon ${INNDSTART} ${INNFLAGS} | |
30 | else | |
31 | show Starting INN service | |
32 | daemon ${INNDSTART} -r ${INNFLAGS} | |
33 | fi | |
34 | else | |
35 | echo 'INND is running' | |
36 | fi | |
37 | touch /var/lock/subsys/inn | |
38 | ;; | |
39 | stop) | |
40 | show Stopping INND service | |
41 | killproc innd | |
42 | rm -f /var/lock/subsys/inn | |
43 | ;; | |
44 | status) | |
45 | status innd | |
46 | ;; | |
47 | reload) | |
48 | show Reloading INND service | |
49 | killproc innd -HUP | |
50 | ;; | |
51 | restart) | |
52 | $0 stop | |
53 | $0 start | |
54 | ;; | |
55 | *) | |
56 | echo "Usage: $0 {start|stop|status|restart}" | |
57 | exit 1 | |
58 | ;; | |
59 | esac | |
60 | ||
61 | exit 0 |