3 # fam FAM, the File Alteration Monitor server
6 # description: FAM provides a daemon and an API which applications
7 # can use to be notified when specific files or directories
10 # pidfile: /var/run/fam.pid
11 # config: /etc/fam.conf
14 # Source function library
15 . /etc/rc.d/init.d/functions
18 . /etc/sysconfig/network
21 [ -f /etc/sysconfig/fam ] && . /etc/sysconfig/fam
23 # Check that networking is up.
24 if is_yes "${NETWORKING}"; then
25 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
26 # nls "ERROR: Networking is down. %s can't be run." <service>
35 # See how we were called.
38 # Check if the service is already running?
39 if [ ! -f /var/lock/subsys/fam ]; then
40 msg_starting "File Alteration Monitor"
41 daemon fam -T0 $FAM_OPTS
43 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/fam
45 msg_already_running "File Alteration Monitor"
50 if [ -f /var/lock/subsys/fam ]; then
51 msg_stopping "File Alteration Monitor"
53 rm -f /var/lock/subsys/fam > /dev/null 2>&1
55 msg_not_running "File Alteration Monitor"
68 msg_usage "$0 {start|stop|restart|force-reload|status}"