diff --git a/scripts/upgrade b/scripts/upgrade index 8a24bbb..74aa886 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -46,3 +46,18 @@ if is_stretch; then install_borg_with_pip fi + +#================================================= +# SETUP THE BACKUP METHOD +#================================================= +ynh_configure backup_method "/etc/yunohost/hooks.d/backup_method/05-${app}_app" + +#================================================= +# CONFIGURE CRON +#================================================= +ynh_configure backup-with-borg "/usr/local/bin/backup-with-$app" +chmod u+x "/usr/local/bin/backup-with-$app" +ynh_add_systemd_config +ynh_configure systemd.timer "/etc/systemd/system/$app.timer" +systemctl enable $app.timer +systemctl start $app.timer