restic: add missing swift region option

This commit is contained in:
Nicolas KAROLAK 2018-06-07 11:49:18 +02:00 committed by Jerome Charaoui
parent 1661e23a11
commit 8082d3d04a
2 changed files with 6 additions and 1 deletions

View File

@ -87,6 +87,8 @@ password = secret
#os_password =
#os_region_name =
[b2]
#b2_account_id =

View File

@ -50,6 +50,7 @@ getconf os_tenant_id
getconf os_tenant_name
getconf os_username
getconf os_password
getconf os_region_name
setsection b2
@ -157,7 +158,7 @@ fi
# OpenStack Swift repository
if [ "$(echo "$repository" | /usr/bin/awk -F ':' '{print $1}')" == "swift" ]; then
[ -z "$os_auth_url" -o -z "$os_tenant_id" -o -z "$os_tenant_name" -o -z "$os_username" -o -z "$os_password" ] && \
[ -z "$os_auth_url" -o -z "$os_tenant_id" -o -z "$os_tenant_name" -o -z "$os_username" -o -z "$os_password" -o -z "$os_region_name" ] && \
fatal "Missing some Swift credentials."
export_debug OS_AUTH_URL "$os_auth_url"
@ -165,6 +166,7 @@ if [ "$(echo "$repository" | /usr/bin/awk -F ':' '{print $1}')" == "swift" ]; th
export_debug OS_TENANT_NAME "$os_tenant_name"
export_debug OS_USERNAME "$os_username"
export_debug OS_PASSWORD "$os_password"
export_debug OS_REGION_NAME "$os_region_name"
fi
@ -453,6 +455,7 @@ unset OS_TENANT_ID
unset OS_TENANT_NAME
unset OS_USERNAME
unset OS_PASSWORD
unset OS_REGION_NAME
unset B2_ACCOUNT_ID
unset B2_ACCOUNT_KEY
unset AZURE_ACCOUNT_NAME