From c516dd82cd3464f1a7277374643454ad2739a0e1 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch> Date: Wed, 3 Nov 2021 11:13:41 +0100 Subject: [PATCH] execute postchange hook on update too --- deploy_app.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/deploy_app.sh b/deploy_app.sh index 2a27cad..bc919b6 100755 --- a/deploy_app.sh +++ b/deploy_app.sh @@ -247,14 +247,18 @@ function deploy(){ # - send success message as email/ slack/ [another fancy tool] test $isupdate -eq 0 && echo $skipmessage test $isupdate -eq 0 || run_task "${profiledir}/tasks_postinstall.sh" - grep . $cfgdiff - if [ $? -eq 0 ]; then + hasfilechange=0 + grep . $cfgdiff && hasfilechange=1 + if [ $hasfilechange -eq 1 ]; then echo "INFO: a config file was created or changed." - run_task "${profiledir}/tasks_postchange.sh" else echo SKIP: No config file was changed. fi + if [ $isupdate -ne 0 -o $hasfilechange -eq 1 ]; then + run_task "${profiledir}/tasks_postchange.sh" + fi + cd $( dirname $0 ) } -- GitLab