New format for multinode container names
This commit is contained in:
parent
58a2b4f041
commit
9dd730fcea
|
@ -305,7 +305,7 @@ class sunetdrive::script (
|
|||
$singlenodes.each | $singlenode| {
|
||||
$multinode = hiera_hash('multinode_mapping')[$singlenode]['server']
|
||||
$multinodeserver = "${multinode}.${site_name}"
|
||||
$nccontainer = "nextcloud${singlenode}_app_1"
|
||||
$nccontainer = "nextcloud-${singlenode}_app_1"
|
||||
|
||||
sunet::scriptherder::cronjob { "listusers_${singlenode}":
|
||||
cmd => "/root/tasks/listusers.sh ${singlenode} ${multinodeserver}",
|
||||
|
|
|
@ -25,7 +25,7 @@ if [[ " ${sixmonths[*]} " =~ " ${customer} " ]]; then
|
|||
else
|
||||
number_of_full_to_keep=1
|
||||
fi
|
||||
container="mariadb${customer}_db_1"
|
||||
container="mariadb-${customer}_db_1"
|
||||
backup_dir="/opt/backups"
|
||||
bucket="db-backups"
|
||||
mirror="${customer}-<%= @environment %>-mirror"
|
||||
|
|
|
@ -5,7 +5,7 @@ shift
|
|||
include_userbuckets="${1}"
|
||||
shift
|
||||
environment="<%= @environment %>"
|
||||
container="nextcloud${customer}_app_1"
|
||||
container="nextcloud-${customer}_app_1"
|
||||
|
||||
yq="/usr/local/bin/yq"
|
||||
if ! [[ -x ${yq} ]]; then
|
||||
|
|
|
@ -4,7 +4,7 @@ customer="${1}"
|
|||
multinode="${2}"
|
||||
environment="<%= @environment %>"
|
||||
location="${customer}-${environment}"
|
||||
userjson=$(ssh "script@${multinode}" "sudo /home/script/bin/list_users.sh nextcloud${customer}_app_1")
|
||||
userjson=$(ssh "script@${multinode}" "sudo /home/script/bin/list_users.sh nextcloud-${customer}_app_1")
|
||||
project="statistics"
|
||||
bucket="drive-server-coms"
|
||||
base_dir="${project}:${bucket}"
|
||||
|
|
|
@ -11,7 +11,7 @@ function usage {
|
|||
exit 1
|
||||
}
|
||||
|
||||
if ! [[ ${container} =~ ^nextcloud[a-z]*_app_1$ ]]; then
|
||||
if ! [[ ${container} == 'nextcloud_app_1' ]] && ! [[ ${container} =~ ^nextcloud-[a-z]*_app_1$ ]]; then
|
||||
usage
|
||||
fi
|
||||
if ! [[ ${bucket} =~ ^[a-zA-Z0-9]+ ]]; then
|
||||
|
@ -26,7 +26,7 @@ echo "$(date): Start executing create_bucket.sh ${1} ${2} ${3}"
|
|||
|
||||
rclone_config="/opt/nextcloud/rclone.conf"
|
||||
if [[ "${container}" != "nextcloud_app_1" ]]; then
|
||||
customer=$(echo "${container}" | sed -e 's/^nextcloud//' -e 's/_app_1$//')
|
||||
customer=$(echo "${container}" | sed -e 's/^nextcloud-//' -e 's/_app_1$//')
|
||||
rclone_config="/opt/multinode/${customer}/rclone.conf"
|
||||
fi
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ function usage {
|
|||
exit 1
|
||||
}
|
||||
|
||||
if ! [[ ${container} =~ ^nextcloud[a-z]*_app_1$ ]]; then
|
||||
if ! [[ ${container} == 'nextcloud_app_1' ]] && ! [[ ${container} =~ ^nextcloud-[a-z]*_app_1$ ]]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
container=${1}
|
||||
|
||||
if ! [[ ${container} =~ ^nextcloud[a-z]*_app_1$ ]]; then
|
||||
if ! [[ ${container} == 'nextcloud_app_1' ]] && ! [[ ${container} =~ ^nextcloud-[a-z]*_app_1$ ]]; then
|
||||
echo "Usage: ${0} <nextcloud container name>"
|
||||
echo "Example : ${0} nextcloud_app_1"
|
||||
exit 1
|
||||
|
|
Loading…
Reference in a new issue