smbd: Clarify smb2 lock checks
[Samba.git] / ctdb / config / events.d / 31.clamd
blob15751a9c60104f4352ab0fd4410a402951e18d52
1 #!/bin/sh
2 # event script to manage clamd in a cluster environment
4 [ -n "$CTDB_BASE" ] || \
5 export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
7 . $CTDB_BASE/functions
9 detect_init_style
11 case $CTDB_INIT_STYLE in
12 redhat)
13 service_name="clamd"
14 service_config="clamd"
17 service_name="clamav"
18 service_config="clamav"
20 esac
22 service_start ()
24 service $service_name stop > /dev/null 2>&1
25 service $service_name start
28 loadconfig
30 ctdb_start_stop_service
32 is_ctdb_managed_service || exit 0
34 case "$1" in
35 startup)
36 ctdb_service_start
39 shutdown)
40 ctdb_service_stop
43 monitor)
44 ctdb_check_unix_socket ${CTDB_CLAMD_SOCKET} || exit $?
48 ctdb_standard_event_handler "$@"
50 esac
52 exit 0