mirror of
https://github.com/YunoHost-Apps/restic_ynh.git
synced 2024-09-03 20:16:22 +02:00
8d57e11cd1
This is an adaptation of https://github.com/YunoHost-Apps/borg_ynh/blob/master/conf/backup-with-borg.j2
36 lines
1.1 KiB
Bash
Executable file
36 lines
1.1 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC START
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
# LOAD SETTINGS
|
|
#=================================================
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
#=================================================
|
|
# REMOVE DEPENDENCIES
|
|
#=================================================
|
|
ynh_remove_app_dependencies
|
|
|
|
#=================================================
|
|
# REMOVE FILES
|
|
#=================================================
|
|
systemctl stop $app.timer
|
|
systemctl disable $app.timer
|
|
ynh_remove_systemd_config
|
|
ynh_secure_remove "/etc/systemd/system/$app.timer"
|
|
ynh_secure_remove "/usr/local/bin/backup-with-$app"
|
|
ynh_secure_remove "/etc/yunohost/hooks.d/backup_method/05-${app}_app"
|
|
|
|
#=================================================
|
|
# REMOVE SSH CONFIG
|
|
#=================================================
|
|
sed -e "/Host ${server}/,+6d" /root/.ssh/config -i || true
|