1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-21 18:04:06 +03:00
Martin Schwenke 82250f3629 ctdb-scripts: Move database handling to its own event script
Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2024-08-29 22:48:33 +00:00

28 lines
514 B
Bash
Executable File

#!/bin/sh
# Event script for ctdb-specific setup and other things that don't fit
# elsewhere.
[ -n "$CTDB_BASE" ] ||
CTDB_BASE=$(d=$(dirname "$0") && cd -P "$d" && dirname "$PWD")
. "${CTDB_BASE}/functions"
load_script_options
############################################################
ctdb_check_args "$@"
case "$1" in
init)
# Initialise script directory
rm -rf "$CTDB_SCRIPT_VARDIR"
mkdir -p "$CTDB_SCRIPT_VARDIR" ||
die "mkdir -p ${CTDB_SCRIPT_VARDIR} - failed - $?" $?
;;
esac
# all OK
exit 0