add snippet 'get-cloud-instance-to-update'..

This commit is contained in:
2023-08-02 14:23:46 +02:00
parent f244232347
commit 08a9bc984d
17 changed files with 103 additions and 685 deletions

View File

@ -197,7 +197,23 @@ while getopts hs: opt ; do
done
if [[ -z "$WEBSITE" ]] ; then
fatal "No website ios given on commandline - Missing Parameter '-s <website>'"
while IFS='' read -r -d '' _conf_file ; do
source $_conf_file
if [[ -n "$WEBSITE" ]] ; then
unsorted_website_arr+=("${WEBSITE}:$_conf_file")
fi
WEBSITE=""
done < <(find "${conf_dir}" -maxdepth 1 -type f -name "*.conf" -print0)
# - Sort array
# -
IFS=$'\n' website_arr=($(sort <<<"${unsorted_website_arr[*]}"))
# Which cloud instance (website) would you like to update
#
source ${snippet_dir}/get-cloud-instance-to-update
fi
WEB_BASE_DIR="/var/www/${WEBSITE}"