3 # innd InterNet News System
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* \
11 # Source function library.
12 . /etc/rc.d/init.d/functions
14 # Source networking configuration.
15 . /etc/sysconfig/network
18 . /usr/share/news/innshellvars
20 # Check that networking is up.
21 if is_yes "${NETWORKING}"; then
22 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
23 msg_network_down "INN"
31 if [ ! -f /var/lock/subsys/inn ]; then
32 grep -v "#" /etc/news/inn.conf | grep ovmethod | grep ovdb 2>&1 >/dev/null
34 if [ $RETVAL -eq 0 ]; then
35 msg_starting "INN ovdb_monitor"
36 daemon --pidfile /var/run/news/ovdb_monitor.pid --user news ovdb_init
40 daemon --pidfile /var/run/news/innd.pid --user news inndstart
42 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/inn
43 if is_yes "$DOINNWATCH" ; then
44 msg_starting "INN Watch"
46 daemon --fork --pidfile /var/run/news/innwatch.pid --user news /usr/bin/innwatch
48 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/innwatch && ok || fail
51 msg_already_running "INN"
56 if [ -f /var/lock/subsys/inn ]; then
59 if ctlinnd shutdown "Stopping INN service"; then
65 if [ -f /var/run/news/innwatch.pid ]; then
66 msg_stopping "INN Watch"
67 killproc --pidfile /var/run/news/innwatch.pid innwatch -9
68 rm -f /var/run/news/innwatch.pid \
69 /var/run/news/LOCK.innwatch >/dev/null 2>&1
72 if [ -f /var/run/news/infeed.pid ]; then
73 msg_stopping "INN Feed"
74 killproc --pidfile /var/run/news/infeed.pid innfeed -9
75 rm -f /var/run/news/innfeed.pid >/dev/null 2>&1
78 if [ -f /var/run/news/actived.pid ]; then
79 msg_stopping "INN Actived"
80 killproc --pidfile /var/run/news/actived.pid actived -9
81 rm -f /var/run/news/actived.pid >/dev/null 2>&1
84 if [ -f /var/run/news/ovdb_monitor.pid ]; then
85 msg_stopping "INN ovdb_monitor"
86 killproc --pidfile /var/run/news/ovdb_monitor.pid ovdb_monitor -15
87 rm -f /var/run/news/ovdb_monitor.pid >/dev/null 2>&1
90 rm -f /var/lock/subsys/inn >/dev/null 2>&1
98 # See how we were called.
109 if [ $? -eq 0 ]; then
114 if [ -f /var/lock/subsys/inn ]; then
117 ctlinnd reload all "Reloading" >/dev/null 2>&1;
118 [ $? -ne 0 ] && RETVAL=7
119 [ $RETVAL -eq 0 ] && ok || died
121 msg_not_running INN >&2
131 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"