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:
parent
391168108d
commit
3f0e67728c
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue