Various improvements
This commit is contained in:
@ -25,7 +25,6 @@ tgt_s3cmd() {
|
||||
log "Run handler ${FUNCNAME[0]}()"
|
||||
|
||||
local uri
|
||||
local src_path
|
||||
|
||||
uri="$1"
|
||||
|
||||
@ -44,7 +43,7 @@ tgt_s3cmd() {
|
||||
# Set s3cmd comand. See s3cmd(1)
|
||||
if [ -n "$s3cmd_config" ]; then
|
||||
# Use configuration file
|
||||
# shellcheck disable=SC2154
|
||||
# shellcheck disable=SC2154,SC2086
|
||||
set -- s3cmd $s3cmd_options --config "$s3cmd_config" \
|
||||
put "${backups[@]}" "$uri"
|
||||
elif [ -n "$s3_access_key" ] && \
|
||||
@ -54,7 +53,7 @@ tgt_s3cmd() {
|
||||
then
|
||||
s3_region="${s3_region:-na}" # fallback to 'no available' region
|
||||
# Use parameters provided from backup script
|
||||
# shellcheck disable=SC2154
|
||||
# shellcheck disable=SC2154,SC2086
|
||||
set -- s3cmd $s3cmd_options \
|
||||
--access_key="$s3_access_key" \
|
||||
--secret_key="$s3_secret_key" \
|
||||
@ -74,6 +73,7 @@ tgt_s3cmd() {
|
||||
# ^^^ hide secret_key from output ^^^
|
||||
|
||||
# Upload backups
|
||||
# shellcheck disable=SC2154
|
||||
if "$@" 2>> "$__log_file"; then
|
||||
: # Success
|
||||
else
|
||||
|
Reference in New Issue
Block a user