mirror of
https://github.com/samba-team/samba.git
synced 2025-01-13 13:18:06 +03:00
17f8295460
Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 58ca2c3e7e3a27023ad86660f01a2052e2a19635)
30 lines
554 B
Bash
Executable File
30 lines
554 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Event script to just sleep longer than the timeout
|
|
# in the monitor action. The purpose is to trigger
|
|
# the event timeout mechanism.
|
|
|
|
[ -n "$CTDB_BASE" ] || \
|
|
export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
|
|
|
|
. $CTDB_BASE/functions
|
|
loadconfig ctdb
|
|
|
|
[ "$CTDB_RUN_TIMEOUT_MONITOR" = "yes" ] || exit 0
|
|
|
|
case "$1" in
|
|
monitor)
|
|
TIMEOUT=$(ctdb getvar EventScriptTimeout | awk '{print $3}')
|
|
echo "sleeping for $((TIMEOUT * 2)) seconds..."
|
|
sleep $((TIMEOUT * 2))
|
|
;;
|
|
|
|
|
|
*)
|
|
ctdb_standard_event_handler "$@"
|
|
;;
|
|
esac
|
|
|
|
exit 0
|
|
|