mirror of
https://github.com/YunoHost-Apps/unattended_upgrades_ynh.git
synced 2024-10-01 13:35:00 +02:00
Fix upgrade and restore
This commit is contained in:
parent
f952320027
commit
f45c1b6b2c
4 changed files with 12 additions and 11 deletions
|
@ -28,7 +28,6 @@
|
|||
unattended_mail="Only if there was an error"
|
||||
unattended_verbosity="2"
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
setup_nourl=1
|
||||
upgrade=1
|
||||
backup_restore=1
|
||||
|
@ -41,7 +40,6 @@
|
|||
unattended_mail="Never"
|
||||
unattended_verbosity="3"
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
setup_nourl=1
|
||||
upgrade=1
|
||||
backup_restore=1
|
||||
|
|
|
@ -55,7 +55,6 @@ ynh_install_app_dependencies apticron unattended-upgrades apt-listchanges
|
|||
#=================================================
|
||||
|
||||
apticron_config="/etc/apticron/apticron.conf"
|
||||
ynh_replace_string "# NOTIFY_NO_UPDATES=.*" "&\nNOTIFY_NO_UPDATES=1" "$apticron_config"
|
||||
ynh_replace_string "# CUSTOM_SUBJECT=.*" \
|
||||
"&\nCUSTOM_SUBJECT=\'[apticron] \$SYSTEM: \$NUM_PACKAGES package update(s)\'" "$apticron_config"
|
||||
ynh_replace_string "# CUSTOM_NO_UPDATES_SUBJECT=.*" \
|
||||
|
|
|
@ -67,12 +67,12 @@ ynh_restore_file "/etc/cron.d/apticron"
|
|||
# SEND A README FOR THE ADMIN
|
||||
#=================================================
|
||||
|
||||
message="To modify any option of unattended-upgrades, please have a look to $unattended_upgrades_config and
|
||||
message="To modify any option of unattended-upgrades, please have a look to /etc/apt/apt.conf.d/50unattended-upgrades and
|
||||
/etc/apt/apt.conf.d/02periodic
|
||||
Unattended-upgrades will be executed every day at midnight.
|
||||
|
||||
To modify the configuration of apticron, please have a look to $apticron_config.
|
||||
Apticron will be executed, depending of the requested configuration at 8 p.m. and 2 a.m. If you want to change this schedule, please have a look to the cron file $apticron_cron.
|
||||
To modify the configuration of apticron, please have a look to /etc/apticron/apticron.conf.
|
||||
Apticron will be executed, depending of the requested configuration at 8 p.m. and 2 a.m. If you want to change this schedule, please have a look to the cron file /etc/cron.d/apticron.
|
||||
|
||||
If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/unattended_upgrades_ynh"
|
||||
|
||||
|
|
|
@ -16,6 +16,8 @@ source _sed
|
|||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
unattended_verbosity=$(ynh_app_setting_get $app unattended_verbosity)
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
#=================================================
|
||||
|
@ -26,12 +28,14 @@ ynh_abort_if_up_to_date
|
|||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
|
||||
# It's impossible to make a backup here, because the backup name is going to have 32 characters. Which is not allowed...
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
ynh_clean_setup () {
|
||||
# restore it if the upgrade fails
|
||||
ynh_restore_upgradebackup
|
||||
}
|
||||
# ynh_backup_before_upgrade
|
||||
# ynh_clean_setup () {
|
||||
# # restore it if the upgrade fails
|
||||
# ynh_restore_upgradebackup
|
||||
# }
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue