3 # famd 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/famd.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/famd ] && . /etc/sysconfig/famd
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 msg_network_down "File Alteration Monitor"
34 # See how we were called.
37 # Check if the service is already running?
38 if [ ! -f /var/lock/subsys/famd ]; then
39 msg_starting "File Alteration Monitor"
40 daemon famd -T 0 $FAM_OPTS
42 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/famd
44 msg_already_running "File Alteration Monitor"
49 if [ -f /var/lock/subsys/famd ]; then
50 msg_stopping "File Alteration Monitor"
52 rm -f /var/lock/subsys/famd > /dev/null 2>&1
54 msg_not_running "File Alteration Monitor"
67 msg_usage "$0 {start|stop|restart|force-reload|status}"