Skip to content
Snippets Groups Projects
Commit 7410832c authored by Axel Hahn's avatar Axel Hahn
Browse files

add first hooks for testing

parent 039dc053
No related branches found
No related tags found
1 merge request!80Add hooks
......@@ -176,6 +176,8 @@ EOFbackupinfo
if [ $bStart -eq 1 ]; then
_j_runHooks "hooks/10-before-backup/always"
sleep 3
# ------------------------------------------------------------
......@@ -188,8 +190,17 @@ EOFbackupinfo
echo "INFO: $(date) - Making local backups ... ${DIR_SELF}/localdump.sh ALL" | tee -a "$JOB_LOGFILE"
_j_runHooks "hooks/12-before-db-service/always"
"${DIR_SELF}"/localdump.sh ALL | tee -a "$JOB_LOGFILE"
rcBackup=$?
if [ $rcBackup -eq 0 ]; then
_j_runHooks "hooks/18-after-db-service/on-ok"
else
_j_runHooks "hooks/18-after-db-service/on-error"
fi
_j_runHooks "hooks/18-after-db-service/always"
echo "INFO: $(date) - local backups were finished" | tee -a "$JOB_LOGFILE"
echo
sleep 2
......
......@@ -185,6 +185,7 @@ function _j_getvar(){
# ------------------------------------------------------------
function _j_runHooks(){
local _hookdir=$1
echo
echo ">>> HOOKS $_hookdir"
for hookscript in $( ls -1a "$_hookdir" | grep -v "^\.*$" | sort )
do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment