1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mobilizon_ynh.git synced 2024-09-03 19:46:19 +02:00

Fix upgrade

This commit is contained in:
yalh76 2021-08-22 13:57:54 +02:00
parent 5c0dc869b1
commit b6fc6445b8

View file

@ -154,13 +154,6 @@ if [ -z "$datadir" ]; then
ynh_secure_remove --file="$final_path/$app/uploads" ynh_secure_remove --file="$final_path/$app/uploads"
fi fi
if [ ! -f "$final_path/$app/config/runtime.exs" ]; then
ynh_delete_file_checksum --file="$final_path/$app/config/prod.secret.exs"
mv "$final_path/$app/config/prod.secret.exs" "$final_path/$app/config/runtime.exs"
ynh_replace_string --match_string="server: true," --replace_string="" --target_file="$final_path/$app/config/runtime.exs"
ynh_store_file_checksum --file="$final_path/$app/config/runtime.exs"
fi
if ynh_version_gt "1.2.3~ynh1" "${previous_version}" ; then if ynh_version_gt "1.2.3~ynh1" "${previous_version}" ; then
ynh_script_progression --message="Upgrade to 1.2.3~ynh1..." ynh_script_progression --message="Upgrade to 1.2.3~ynh1..."
ynh_delete_file_checksum --file="$final_path/$app/config/runtime.exs" ynh_delete_file_checksum --file="$final_path/$app/config/runtime.exs"
@ -168,6 +161,14 @@ if ynh_version_gt "1.2.3~ynh1" "${previous_version}" ; then
ynh_store_file_checksum --file="$final_path/live/config/runtime.exs" ynh_store_file_checksum --file="$final_path/live/config/runtime.exs"
fi fi
if [ ! -f "$final_path/live/config/runtime.exs" ]; then
ynh_delete_file_checksum --file="$final_path/$app/config/prod.secret.exs"
ynh_delete_file_checksum --file="$final_path/live/config/prod.secret.exs"
mv "$final_path/live/config/prod.secret.exs" "$final_path/live/config/runtime.exs"
ynh_replace_string --match_string="server: true," --replace_string="" --target_file="$final_path/live/config/runtime.exs"
ynh_store_file_checksum --file="$final_path/live/config/runtime.exs"
fi
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
#================================================= #=================================================