#!/bin/bash #================================================= # GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= if [ ! -e _common.sh ]; then # Get the _common.sh file if it's not in the current directory cp ../settings/scripts/_common.sh ./_common.sh chmod a+rx _common.sh fi source _common.sh 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 #================================================= # SPECIFIC BACKUP #================================================= # BACKUP UNATTENDED-UPGRADES CONFIG #================================================= ynh_backup "/etc/apt/apt.conf.d/50unattended-upgrades" # backup also the backup config file ynh_backup "/etc/apt/50unattended-upgrades.backup" #================================================= # BACKUP APT PERIODIC #================================================= ynh_backup "/etc/apt/apt.conf.d/02periodic" #================================================= # BACKUP APTICRON CONFIG #================================================= ynh_backup "/etc/apticron/apticron.conf" #================================================= # BACKUP OF THE CRON FILE #================================================= ynh_backup "/etc/cron.d/apticron"