1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/ctdb/config/notify.sh
Martin Schwenke ed80fc1344 ctdb-daemon: Provide a default location for the notification script
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00

25 lines
429 B
Bash
Executable File

#!/bin/sh
# This is script is invoked from ctdb when certain events happen. See
# /etc/ctdb/notify.d/README for more details.
d=$(dirname "$0")
nd="${d}/notify.d"
ok=true
for i in "${nd}/"* ; do
# Don't run files matching basename
case "${i##*/}" in
*~|*,|*.rpm*|*.swp|README) continue ;;
esac
# Files must be executable
[ -x "$i" ] || continue
# Flag failures
"$i" "$1" || ok=false
done
$ok