mirror of
https://github.com/YunoHost-Apps/borg_ynh.git
synced 2024-09-03 18:16:05 +02:00
commit
76db172fa5
2 changed files with 3 additions and 3 deletions
|
@ -15,14 +15,14 @@ filter_hooks() {
|
||||||
|
|
||||||
# Backup system part conf
|
# Backup system part conf
|
||||||
conf=$(yunohost app setting {{ app }} conf)
|
conf=$(yunohost app setting {{ app }} conf)
|
||||||
if [ "$conf" = "true" ]
|
if [ $conf -eq 1 ]
|
||||||
then
|
then
|
||||||
yunohost backup create $ignore_apps -n auto_conf --method {{ app }}_app --system $(filter_hooks conf)
|
yunohost backup create $ignore_apps -n auto_conf --method {{ app }}_app --system $(filter_hooks conf)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Backup system data
|
# Backup system data
|
||||||
data=$(yunohost app setting {{ app }} data)
|
data=$(yunohost app setting {{ app }} data)
|
||||||
if [ "$data" = "true" ]
|
if [ $data -eq 1 ]
|
||||||
then
|
then
|
||||||
yunohost backup create $ignore_apps -n auto_data --method {{ app }}_app --system $(filter_hooks data)
|
yunohost backup create $ignore_apps -n auto_data --method {{ app }}_app --system $(filter_hooks data)
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
BORG_PASSPHRASE="{{ passphrase }}"
|
BORG_PASSPHRASE="{{ passphrase }}"
|
||||||
if grep "{{ server }}" ~/.ssh/known_hosts; then
|
if ssh-keygen -F "{{ server }}" >/dev/null ; then
|
||||||
BORG_RSH="ssh -i /root/.ssh/id_{{ app }}_ed25519 -oStrictHostKeyChecking=yes "
|
BORG_RSH="ssh -i /root/.ssh/id_{{ app }}_ed25519 -oStrictHostKeyChecking=yes "
|
||||||
else
|
else
|
||||||
BORG_RSH="ssh -i /root/.ssh/id_{{ app }}_ed25519 -oStrictHostKeyChecking=no "
|
BORG_RSH="ssh -i /root/.ssh/id_{{ app }}_ed25519 -oStrictHostKeyChecking=no "
|
||||||
|
|
Loading…
Add table
Reference in a new issue