mirror of
https://github.com/YunoHost-Apps/restic_ynh.git
synced 2024-09-03 20:16:22 +02:00
31 lines
887 B
Text
31 lines
887 B
Text
|
#!/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"
|