updated config variables and testing basio config

This commit is contained in:
2020-11-17 20:18:41 -05:00
parent 3fdff6e677
commit 033604cf0a
2 changed files with 11 additions and 10 deletions

View File

@@ -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:)"]

View File

@@ -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>/'${BACKUP_ID}'/' /.duplicacy/preferences
sed --in-place 's/<PROTOCOL>/'${PROTOCOL}'/' /.duplicacy/preferences
sed --in-place 's/<ssh_username>/'${SSH_USERNAME}'/' /.duplicacy/preferences
sed --in-place 's/<ssh_password>/'${SSH_PASSWORD}'/' /.duplicacy/preferences
sed --in-place 's/<SSH_USERNAME>/'${SSH_USERNAME}'/' /.duplicacy/preferences
sed --in-place 's/<SSH_PASSWORD>/'${SSH_PASSWORD}'/' /.duplicacy/preferences
sed --in-place 's/<BACKUP_SERVER>/'${BACKUP_SERVER}'/' /.duplicacy/preferences
sed --in-place 's/<BACKUP_SERVER_PATH>/'${BACKUP_SERVER_PATH}'/' /.duplicacy/preferences