apacheconfig: mettre à jour le dépôt avant de charger la configuration

This commit is contained in:
Jephté Clain 2017-06-20 13:11:30 +04:00
parent 80ae9d74bd
commit 4f9939715b
1 changed files with 6 additions and 5 deletions

View File

@ -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}