support des options --wamap et --protect depuis la configuration locale de déploiement
This commit is contained in:
parent
3bbabbf811
commit
a84775ce48
20
rtoinst
20
rtoinst
|
@ -142,16 +142,28 @@ if [ $# -eq 0 ] || [[ "$1" == -* ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## Hôtes sur lesquels faire le déploiement
|
## Hôtes sur lesquels faire le déploiement
|
||||||
|
toinst_options=()
|
||||||
if array_isempty hosts && [ -n "$deploy_enable" ]; then
|
if array_isempty hosts && [ -n "$deploy_enable" ]; then
|
||||||
urequire deploy
|
urequire deploy
|
||||||
deploy_setconf "$deploy_confname"
|
deploy_setconf "$deploy_confname"
|
||||||
if deploy_loadconf; then
|
if deploy_loadconf; then
|
||||||
setxx webapp=abspath "$1" // basename --
|
setxx webapp=abspath "$1" // basename --
|
||||||
if eval "$(deploy_query -v host DEST webapp rtoinst_deploy "$deploy_profile" shell "$webapp")"; then
|
if eval "$(deploy_query -v host,wamap,protect DEST webapp rtoinst_deploy "$deploy_profile" shell "$webapp")"; then
|
||||||
check_interaction -c && einfo "Cette webapp sera déployée vers les hôtes suivants:
|
msg="Cette webapp sera déployée vers les hôtes suivants:
|
||||||
$(array_to_lines host "" " ")"
|
$(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
|
ask_any "Voulez-vous continuer?" Oq || die
|
||||||
array_copy hosts host
|
array_copy hosts host
|
||||||
|
[ -n "$wamap" ] && array_add toinst_options --wamap "$wamap"
|
||||||
|
[ -n "$protect" ] && array_add toinst_options --protect "$protect"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -218,7 +230,7 @@ rinteraction=$__interaction
|
||||||
for host in "${hosts[@]}"; do
|
for host in "${hosts[@]}"; do
|
||||||
if [ "$host" == "localhost" ]; then
|
if [ "$host" == "localhost" ]; then
|
||||||
etitle -s "Déploiement sur l'hôte local"
|
etitle -s "Déploiement sur l'hôte local"
|
||||||
"$archive" ${tmproot:+--tmproot "$tmproot"} -- "$@"
|
"$archive" ${tmproot:+--tmproot "$tmproot"} -- "${webapps[@]}" "$@" "${toinst_options[@]}"
|
||||||
eend
|
eend
|
||||||
else
|
else
|
||||||
splituserhost "$host" user host
|
splituserhost "$host" user host
|
||||||
|
@ -234,7 +246,7 @@ __estack=$(qval "$__estack")
|
||||||
__tlevel=$(qval "$__tlevel")
|
__tlevel=$(qval "$__tlevel")
|
||||||
export __interaction __estack __tlevel
|
export __interaction __estack __tlevel
|
||||||
${UTOOLS_LANG:+UTOOLS_LANG='$UTOOLS_LANG'; export UTOOLS_LANG
|
${UTOOLS_LANG:+UTOOLS_LANG='$UTOOLS_LANG'; export UTOOLS_LANG
|
||||||
}$(qvals "./$archivename" ${tmproot:+--tmproot "$tmproot"} -- "${webapps[@]}" "$@")"
|
}$(qvals "./$archivename" ${tmproot:+--tmproot "$tmproot"} -- "${webapps[@]}" "$@" "${toinst_options[@]}")"
|
||||||
eend
|
eend
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue