From 4f9939715b2385ee5336fe18d4eb8f8ba540cbf4 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Tue, 20 Jun 2017 13:11:30 +0400 Subject: [PATCH] =?UTF-8?q?apacheconfig:=20mettre=20=C3=A0=20jour=20le=20d?= =?UTF-8?q?=C3=A9p=C3=B4t=20avant=20de=20charger=20la=20configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apacheconfig | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/apacheconfig b/apacheconfig index 857205b..2ec25dc 100755 --- a/apacheconfig +++ b/apacheconfig @@ -160,6 +160,12 @@ if [ "$nohideconfig" == auto ]; then [ -n "$FULLCONF" ] && nohideconfig= || nohideconfig=1 fi +if [ -n "$pull" ]; then + estep "Mise à jour du dépôt" + [ -d "$destdir" ] || die "$destdir: répertoire introuvable" + (cd "$destdir" && git pull) || die +fi + apacheconfig_loadconf "$destdir" "$nohideconfig" || die apacheconfig_sysinfos "$sysname" "$sysdist" "$sysver" "$bits" @@ -197,11 +203,6 @@ $__TEMPLATECTL_HELP" elif [ "$action" == deploy -o "$action" == localhosts ]; then [ -d "$destdir" ] || die "$destdir: répertoire introuvable" - if [ -n "$pull" ]; then - estep "Mise à jour du dépôt" - (cd "$destdir" && git pull) || die - fi - args=( -d "$destdir" --$action ${fixip:+--fix-ip}