From 033604cf0a07c175281dd5fa6bbe9e434ae09c38 Mon Sep 17 00:00:00 2001 From: John Gaunt Date: Tue, 17 Nov 2020 20:18:41 -0500 Subject: [PATCH] updated config variables and testing basio config --- duplicacy/config.json | 10 +++++----- duplicacy/run.sh | 11 ++++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/duplicacy/config.json b/duplicacy/config.json index 0ba9f6a..2abe4a3 100644 --- a/duplicacy/config.json +++ b/duplicacy/config.json @@ -1,6 +1,6 @@ { "name": "duplicacy", - "version": "20201117.2", + "version": "20201117.3", "slug": "duplicacy", "description": "Duplicacy backup", "arch": ["armhf", "armv7"], @@ -11,8 +11,8 @@ "options": { "backupID": "Put your backup ID name here", "protocol": "sftp", - "username": "root", - "password": "password", + "ssh_username": "root", + "ssh_password": "password", "server": "server.example.com", "path": "/opt/some/folder/on/on/server", "filters": [ @@ -26,8 +26,8 @@ "schema": { "backupID": "str", "protocol": "str", - "username": "str", - "password": "str", + "ssh_username": "str", + "ssh_password": "str", "server": "str", "path": "str", "filters": ["match(^i:|e:)"] diff --git a/duplicacy/run.sh b/duplicacy/run.sh index 0baeb8b..71966c6 100644 --- a/duplicacy/run.sh +++ b/duplicacy/run.sh @@ -5,10 +5,11 @@ CONFIG_PATH=/data/options.json SYSTEM_USER=/data/system_user.json # grab user variables -BACKUP_ID=$(jq --raw-output ".backupID" $CONFIG_PATH) +#BACKUP_ID=$(jq --raw-output ".backupID" $CONFIG_PATH) +BACKUP_ID=$(bashio::config 'BACKUP_ID') PROTOCOL=$(jq --raw-output ".protocol" $CONFIG_PATH) -SSH_USERNAME=$(jq --raw-output ".username" $CONFIG_PATH) -SSH_PASSWORD=$(jq --raw-output ".password" $CONFIG_PATH) +SSH_USERNAME=$(jq --raw-output ".ssh_username" $CONFIG_PATH) +SSH_PASSWORD=$(jq --raw-output ".ssh_password" $CONFIG_PATH) BACKUP_SERVER=$(jq --raw-output ".server" $CONFIG_PATH) BACKUP_SERVER_PATH=$(jq --raw-output ".path" $CONFIG_PATH) FILTERS=$(jq --raw-output ".filters" $CONFIG_PATH) @@ -19,8 +20,8 @@ touch /.duplicacy/filters # edit the /.duplicacy/preferences file sed --in-place 's//'${BACKUP_ID}'/' /.duplicacy/preferences sed --in-place 's//'${PROTOCOL}'/' /.duplicacy/preferences -sed --in-place 's//'${SSH_USERNAME}'/' /.duplicacy/preferences -sed --in-place 's//'${SSH_PASSWORD}'/' /.duplicacy/preferences +sed --in-place 's//'${SSH_USERNAME}'/' /.duplicacy/preferences +sed --in-place 's//'${SSH_PASSWORD}'/' /.duplicacy/preferences sed --in-place 's//'${BACKUP_SERVER}'/' /.duplicacy/preferences sed --in-place 's//'${BACKUP_SERVER_PATH}'/' /.duplicacy/preferences