1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-27 14:04:05 +03:00

27 lines
475 B
Plaintext
Raw Normal View History

#!/bin/sh
#
# Event script to just sleep longer than the timeout
# in the monitor action. The purpose is to trigger
# the event timeout mechanism.
. $CTDB_BASE/functions
loadconfig ctdb
[ "$CTDB_RUN_TIMEOUT_MONITOR" = "yes" ] || exit 0
case "$1" in
monitor)
TIMEOUT=$(ctdb listvars | awk '$1 == "EventScriptTimeout" {print $3}')
echo "sleeping for $((TIMEOUT * 2)) seconds..."
sleep $((TIMEOUT * 2))
;;
*)
ctdb_standard_event_handler "$@"
;;
esac
exit 0