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

Update upgrade

This commit is contained in:
Éric Gaspar 2023-10-06 21:07:20 +02:00
parent 391168108d
commit 3f0e67728c

View file

@ -24,11 +24,16 @@ upgrade_type=$(ynh_check_app_version_changed)
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
# If secret_key doesn't exist, create it
if [[ -z "${secret_key:-}" ]]; then
if [ -z "${secret_key:-}" ]; then
secret_key=$(ynh_string_random --length=50)
ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key
fi
if [ -d "$install_dir/data" ]; then
ynh_print_warn "Migrating data directory to $data_dir..."
mv "$install_dir/data" "$data_dir"
fi
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================