diff --git a/backup_grafana.sh b/backup_grafana.sh index 8645cdbeb29f1729873890b49929f00d923da560..10fccebb3a2fce8044519ef85b780ec75f341e33 100755 --- a/backup_grafana.sh +++ b/backup_grafana.sh @@ -4,12 +4,12 @@ set -e trap 'echo -ne "\n:::\n:::\tCaught signal, exiting at line $LINENO, while running :${BASH_COMMAND}:\n:::\n"; exit' SIGINT SIGQUIT -current_path=$(pwd) +current_path=$(dirname "$0") settings_file="${1:-grafanaSettings}" backup_dir="_OUTPUT_" timestamp=$(date +"%Y-%m-%dT%H-%M-%S") -if [[ ! -f "conf/${settings_file}" ]]; then +if [[ ! -f "${current_path}/src/conf/${settings_file}.py" ]]; then echo "Usage:" echo "\t$0 <settings_file>" echo "\te.g. $1 'grafanaSettings'" diff --git a/restore_grafana.sh b/restore_grafana.sh index e27eed0fa703279b5be4db98df70b2f78b16110c..d8206553bce41ed54a091d5148fff0da3fdd4aed 100755 --- a/restore_grafana.sh +++ b/restore_grafana.sh @@ -4,15 +4,15 @@ set -e trap 'echo -ne "\n:::\n:::\tCaught signal, exiting at line $LINENO, while running :${BASH_COMMAND}:\n:::\n"; exit' SIGINT SIGQUIT -current_path=$(pwd) +current_path=$(dirname "$0") archive_file="$1" settings_file="${2:-grafanaSettings}" -if [[ ! -f "${archive_file}" || ! -f "conf/${settings_file}" ]]; then +if [[ ! -f "${archive_file}" || ! -f "${current_path}/src/conf/${settings_file}.py" ]]; then echo "Usage:" echo "\t$0 <archive_file>" echo "\te.g. $0 '_OUTPUT_/2019-05-13T11-04-33.tar.gz'" - echo "\t$1 <settings_file>" + echo "\t$1 <settings_file_name>" echo "\te.g. $1 'grafanaSettings'" exit 1 fi diff --git a/src/conf/__init__.py b/src/conf/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391