From cd110f2944e9fb37cd1f21bb869d24949f6941f0 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Fri, 11 Dec 2009 00:18:29 +0100 Subject: new version, mysql binlog reset --- common/init.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 common/init.sh (limited to 'common/init.sh') diff --git a/common/init.sh b/common/init.sh new file mode 100644 index 0000000..a955f18 --- /dev/null +++ b/common/init.sh @@ -0,0 +1,21 @@ +# init common function for backup + +# get path to common script dir +if [ -z "${BACKUP_ROOT}" -o ! -d "${BACKUP_ROOT}/common/" ]; then + echo "\$BACKUP_ROOT not set or invalid! (common dir not there)" >&2 + echo "Please set it to the path to the root directory of the" >&2 + echo "backup scripts before sourcing this init.sh file." >&2 + exit 1 +fi + +# load all common scripts +for file in ${BACKUP_ROOT}/common/* +do + if [ "$(basename ${file})" != "init.sh" ]; then + source "${file}" + fi +done + +# check if git is available for update +_check_tools git +_self_update -- cgit v1.2.3