1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/plume_ynh.git synced 2024-09-03 20:15:54 +02:00

Update upgrade

This commit is contained in:
yalh76 2021-04-10 18:46:46 +02:00
parent 030c1cb58f
commit 44bdff9beb

View file

@ -66,7 +66,7 @@ then
fi fi
#================================================= #=================================================
# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#================================================= #=================================================
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." ynh_script_progression --message="Backing up the app before upgrading (may take a while)..."
@ -159,16 +159,6 @@ pushd $final_path/$app
sudo -u "$app" env PATH=$PATH plm migration run sudo -u "$app" env PATH=$PATH plm migration run
popd popd
#=================================================
# STORE THE CONFIG FILE CHECKSUM
#=================================================
ynh_script_progression --message="Storing the config file checksum..."
config_file="$final_path/$app/.env"
ynh_backup_if_checksum_is_different --file=$config_file
# Recalculate and store the checksum of the file for the next upgrade.
ynh_store_file_checksum --file=$config_file
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD
#================================================= #=================================================
@ -177,6 +167,16 @@ ynh_script_progression --message="Upgrading systemd configuration..."
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_systemd_config ynh_add_systemd_config
#=================================================
# UPDATE A CONFIG FILE
#=================================================
ynh_script_progression --message="Updating a config file..."
ynh_add_config --template="../conf/.env" --destination="$final_path/$app/.env"
chmod 400 "$final_path/$app/.env"
chown $app:$app "$final_path/$app/.env"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
#================================================= #=================================================