From 4a204d826b1c7f0caa08271ef34d25198227c90a Mon Sep 17 00:00:00 2001 From: Kay0u Date: Wed, 23 Feb 2022 14:59:25 +0100 Subject: [PATCH] fix upgrade --- scripts/upgrade | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 231db79..de91b2f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,11 +23,6 @@ ynh_script_progression --message="Ensuring downward compatibility..." sed -i "/root:1000000:65536 # Added by lxd#/d" /etc/sub{u,g}id -# Remove old file -if [ -f "/usr/local/bin/lxd-p2c" ]; then - ynh_secure_remove --file="/usr/local/bin/lxd-p2c" -fi - #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -46,6 +41,11 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors +# Remove old file +if [ -f "/usr/local/bin/lxd-p2c" ]; then + ynh_secure_remove --file="/usr/local/bin/lxd-p2c" +fi + #================================================= # STANDARD UPGRADE STEPS #=================================================