blob: 5d60fe3aa375ea5afb3a9a50715075f312493af8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#!/bin/sh
# event script to manage clamd in a cluster environment
[ -n "$CTDB_BASE" ] || \
CTDB_BASE=$(d=$(dirname "$0") && cd -P "$d" && dirname "$PWD")
. "${CTDB_BASE}/functions"
detect_init_style
case $CTDB_INIT_STYLE in
redhat)
service_name="clamd"
;;
*)
service_name="clamav"
;;
esac
load_script_options
case "$1" in
startup)
service "$service_name" stop > /dev/null 2>&1
service "$service_name" start || exit $?
;;
shutdown)
service "$service_name"_stop
;;
monitor)
ctdb_check_unix_socket "$CTDB_CLAMD_SOCKET" || exit $?
;;
esac
exit 0
|