From 295edc2f0d2618c44268d8f7dd3765c80c20d881 Mon Sep 17 00:00:00 2001 From: Andrew Engelbrecht Date: Sun, 17 Oct 2021 13:23:49 -0400 Subject: [PATCH] add underscore to variable name (for clarity) the script will print a helpful error if the old variable name is used, and so far, we're probably the only users of this script --- kaya | 8 ++++---- kaya.conf | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kaya b/kaya index c172575..d8d3923 100755 --- a/kaya +++ b/kaya @@ -164,8 +164,8 @@ main() { # shellcheck source=/etc/kaya.conf source "${global_conf}" - if [[ -z $backuproot ]]; then - echo "kaya: error: no backuproot variable set in ${global_conf}" >&2 + if [[ -z $backup_root ]]; then + echo "kaya: error: no backup_root variable set in ${global_conf}" >&2 exit 1 fi if [[ -z $local_port ]]; then @@ -175,9 +175,9 @@ main() { remote_port=8777 fi - backup_dir="${backuproot}/${hostname}" + backup_dir="${backup_root}/${hostname}" password_file="${backup_dir}/repo-password-keep" - htpasswd_file="${backuproot}/.htpasswd" + htpasswd_file="${backup_root}/.htpasswd" if [[ ! -d $backup_dir ]]; then create-backup-dir diff --git a/kaya.conf b/kaya.conf index 1fa2254..2ed2084 100644 --- a/kaya.conf +++ b/kaya.conf @@ -4,7 +4,7 @@ # # This will be sourced by bash -backuproot=/srv/backups/kaya +backup_root=/srv/backups/kaya # set if using non-default port as in 'rest-server --listen :PORT' # local_port=8000 -- 2.25.1