diff --git a/rtoinst b/rtoinst index 1969527..904af38 100755 --- a/rtoinst +++ b/rtoinst @@ -142,16 +142,28 @@ if [ $# -eq 0 ] || [[ "$1" == -* ]]; then fi ## Hôtes sur lesquels faire le déploiement +toinst_options=() if array_isempty hosts && [ -n "$deploy_enable" ]; then urequire deploy deploy_setconf "$deploy_confname" if deploy_loadconf; then setxx webapp=abspath "$1" // basename -- - if eval "$(deploy_query -v host DEST webapp rtoinst_deploy "$deploy_profile" shell "$webapp")"; then - check_interaction -c && einfo "Cette webapp sera déployée vers les hôtes suivants: + if eval "$(deploy_query -v host,wamap,protect DEST webapp rtoinst_deploy "$deploy_profile" shell "$webapp")"; then + msg="Cette webapp sera déployée vers les hôtes suivants: $(array_to_lines host "" " ")" + if [ -n "$wamap" -o -n "$protect" ]; then + msg="$msg +avec le(s) paramètre(s) suivant(s):" + [ -n "$wamap" ] && msg="$msg + --wamap $(qval "$wamap")" + [ -n "$protect" ] && msg="$msg + --protect $(qval "$protect")" + fi + check_interaction -c && einfo "$msg" ask_any "Voulez-vous continuer?" Oq || die array_copy hosts host + [ -n "$wamap" ] && array_add toinst_options --wamap "$wamap" + [ -n "$protect" ] && array_add toinst_options --protect "$protect" fi fi fi @@ -218,7 +230,7 @@ rinteraction=$__interaction for host in "${hosts[@]}"; do if [ "$host" == "localhost" ]; then etitle -s "Déploiement sur l'hôte local" - "$archive" ${tmproot:+--tmproot "$tmproot"} -- "$@" + "$archive" ${tmproot:+--tmproot "$tmproot"} -- "${webapps[@]}" "$@" "${toinst_options[@]}" eend else splituserhost "$host" user host @@ -234,7 +246,7 @@ __estack=$(qval "$__estack") __tlevel=$(qval "$__tlevel") export __interaction __estack __tlevel ${UTOOLS_LANG:+UTOOLS_LANG='$UTOOLS_LANG'; export UTOOLS_LANG -}$(qvals "./$archivename" ${tmproot:+--tmproot "$tmproot"} -- "${webapps[@]}" "$@")" +}$(qvals "./$archivename" ${tmproot:+--tmproot "$tmproot"} -- "${webapps[@]}" "$@" "${toinst_options[@]}")" eend fi done