From 8082d3d04a951ec59428d7155510b7919daea1ef Mon Sep 17 00:00:00 2001 From: Nicolas KAROLAK Date: Thu, 7 Jun 2018 11:49:18 +0200 Subject: [PATCH] restic: add missing swift region option --- examples/example.restic | 2 ++ handlers/restic | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/example.restic b/examples/example.restic index 91b958b..dd47f00 100644 --- a/examples/example.restic +++ b/examples/example.restic @@ -87,6 +87,8 @@ password = secret #os_password = +#os_region_name = + [b2] #b2_account_id = diff --git a/handlers/restic b/handlers/restic index 3476fa5..728bd27 100644 --- a/handlers/restic +++ b/handlers/restic @@ -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