1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/restic_ynh.git synced 2024-09-03 20:16:22 +02:00
restic_ynh/scripts/backup
2020-02-23 12:02:10 +01:00

30 lines
887 B
Bash
Executable file

#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source /usr/share/yunohost/helpers
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================
app=$YNH_APP_INSTANCE_NAME
ynh_backup "/usr/local/bin/backup-with-$app"
ynh_backup "/etc/systemd/system/$app.service"
ynh_backup "/etc/systemd/system/$app.timer"
ynh_backup "/etc/yunohost/hooks.d/backup_method/05-${app}_app"
ynh_backup "/root/.ssh/id_${app}_ed25519"
ynh_backup "/root/.ssh/id_${app}_ed25519.pub"