3 # newscache newscache - news caching daemon
7 # description: NewsCache acts to news reading clients like a news server,\
8 # except that it stores only those articles that have been\
9 # requested by at least one client. NewsCache targets problems\
10 # of the current News System like network bandwidth consumption\
11 # or the IO load caused by news clients.
14 # Source function library
15 . /etc/rc.d/init.d/functions
18 . /etc/sysconfig/network
20 # Get service config - may override defaults
21 [ -f /etc/sysconfig/newscache ] && . /etc/sysconfig/newscache
23 # Check that networking is up.
24 if is_yes "${NETWORKING}"; then
25 if [ ! -f /var/lock/subsys/network ]; then
26 msg_network_down newscache
34 # See how we were called.
37 # Check if the service is already running?
38 if [ ! -f /var/lock/subsys/newscache ]; then
39 msg_starting newscache
42 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/newscache
44 msg_already_running newscache
48 if [ -f /var/lock/subsys/newscache ]; then
50 msg_stopping newscache
52 rm -f /var/lock/subsys/newscache
54 msg_not_running newscache
63 if [ -f /var/lock/subsys/newscache ]; then
64 msg_reloading newscache
65 killproc newscache -HUP
68 msg_not_running newscache >&2
73 # if program allows reloading without stopping
86 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
92 # This must be last line !
93 # vi:syntax=sh:tw=78:ts=8:sw=4