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"
30 if [ ! -f /var/lock/subsys/inn ]; then
31 grep -v "#" /etc/news/inn.conf | grep ovmethod | grep ovdb 2>&1 >/dev/null
33 if [ $RETVAL -eq 0 ]; then
34 msg_starting "INN ovdb_monitor"
35 daemon --user news ovdb_init
39 daemon --user=news inndstart
41 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/inn
42 if is_yes "$DOINNWATCH" ; then
43 msg_starting "INN Watch"
45 daemon --fork --user news /usr/bin/innwatch
47 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/inn
50 msg_already_running "INN"
55 if [ -f /var/lock/subsys/inn ]; then
58 if ctlinnd shutdown "Stopping INN service"; then
64 if [ -f /var/run/news/innwatch.pid ]; then
65 msg_stopping "INN Watch"
67 if killall -9 innwatch; then
72 rm -f /var/run/news/innwatch.pid \
73 /var/run/news/LOCK.innwatch >/dev/null 2>&1
76 if [ -f /var/run/news/infeed.pid ]; then
77 msg_stopping "INN Feed"
79 rm -f /var/run/news/innfeed.pid >/dev/null 2>&1
82 if [ -f /var/run/news/actived.pid ]; then
83 msg_stopping "INN Actived"
85 rm -f /var/run/news/actived.pid >/dev/null 2>&1
88 if [ -f /var/run/news/ovdb_monitor.pid ]; then
89 msg_stopping "INN ovdb_monitor"
90 killproc ovdb_monitor -15
93 rm -f /var/lock/subsys/inn >/dev/null 2>&1
101 # See how we were called.
112 if [ $? -eq 0 ]; then
117 if [ -f /var/lock/subsys/inn ]; then
120 ctlinnd reload all "Reloading" >/dev/null 2>&1;
121 [ $? -ne 0 ] && RETVAL=7
122 [ $RETVAL -eq 0 ] && ok || died
124 msg_not_running INN >&2
134 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"