mirror of
https://github.com/YunoHost-Apps/restic_ynh.git
synced 2024-09-03 20:16:22 +02:00
Fixing hardcoded values, replacing by YNH calls
Hard-tested in production, please review with fresh install. Debian buster with latest YNH stable.
This commit is contained in:
parent
9971c585e4
commit
3fa8df45d6
2 changed files with 17 additions and 4 deletions
|
@ -2,8 +2,16 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
RESTIC_PASSWORD="{{ passphrase }}"
|
###
|
||||||
RESTIC_REPOSITORY_BASE=sftp:{{ server }}:{{ backup_path }}
|
# Fetch information from YNH settings
|
||||||
|
###
|
||||||
|
RESTIC_SERVER=$(yunohost app setting restic server)
|
||||||
|
RESTIC_SERVER_PORT=$(yunohost app setting restic port)
|
||||||
|
RESTIC_PATH=$(yunohost app setting restic backup_path)
|
||||||
|
|
||||||
|
RESTIC_PASSWORD="$(yunohost app setting restic passphrase)"
|
||||||
|
RESTIC_REPOSITORY_BASE=sftp://$RESTIC_SERVER:$RESTIC_SERVER_PORT/$RESTIC_PATH/
|
||||||
|
|
||||||
RESTIC_COMMAND=/usr/local/bin/restic
|
RESTIC_COMMAND=/usr/local/bin/restic
|
||||||
LOGFILE=/var/log/restic_backup.log
|
LOGFILE=/var/log/restic_backup.log
|
||||||
ERRFILE=/var/log/restic_backup.err
|
ERRFILE=/var/log/restic_backup.err
|
||||||
|
|
|
@ -2,8 +2,13 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
RESTIC_PASSWORD="{{ passphrase }}"
|
RESTIC_SERVER=$(yunohost app setting restic server)
|
||||||
RESTIC_REPOSITORY_BASE=sftp:{{ server }}:{{ backup_path }}
|
RESTIC_SERVER_PORT=$(yunohost app setting restic port)
|
||||||
|
RESTIC_PATH=$(yunohost app setting restic backup_path)
|
||||||
|
|
||||||
|
RESTIC_PASSWORD="$(yunohost app setting restic passphrase)"
|
||||||
|
RESTIC_REPOSITORY_BASE=sftp://$RESTIC_SERVER:$RESTIC_SERVER_PORT/$RESTIC_PATH/
|
||||||
|
|
||||||
RESTIC_COMMAND=/usr/local/bin/restic
|
RESTIC_COMMAND=/usr/local/bin/restic
|
||||||
|
|
||||||
do_check() {
|
do_check() {
|
||||||
|
|
Loading…
Reference in a new issue