CVE-2016-0771: tests/dns: Remove dependencies on env variables
[Samba.git] / ctdb / config / events.d / 99.timeout
blob2a6495a619360d322c6f318d95928477d403908b
1 #!/bin/sh
3 # Event script to just sleep longer than the timeout
4 # in the monitor action. The purpose is to trigger
5 # the event timeout mechanism.
7 [ -n "$CTDB_BASE" ] || \
8 export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
10 . $CTDB_BASE/functions
11 loadconfig ctdb
13 [ "$CTDB_RUN_TIMEOUT_MONITOR" = "yes" ] || exit 0
15 case "$1" in
16 monitor)
17 TIMEOUT=$(ctdb getvar EventScriptTimeout | awk '{print $3}')
18 echo "sleeping for $((TIMEOUT * 2)) seconds..."
19 sleep $((TIMEOUT * 2))
24 ctdb_standard_event_handler "$@"
26 esac
28 exit 0