1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/etherpad_ynh.git synced 2024-09-03 18:36:10 +02:00

Update upgrade

This commit is contained in:
ericgaspar 2023-12-11 11:48:11 +01:00
parent 51623e824c
commit bc87f06ee9

View file

@ -24,6 +24,32 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=42
ynh_systemd_action --service_name=$app --action=stop --log_path="systemd"
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=2
if [ -z "${language:-}" ]; then
# If upgrading from a version which doesn't support translations, set language to English by default
language=en
ynh_app_setting_set --app=$app --key=language --value=$language
fi
if [ -z "${export:-}" ]; then
export=none
ynh_app_setting_set --app=$app --key=export --value=$export
fi
if [ -z "${path:-}" ]; then
path="/"
ynh_app_setting_set --app=$app --key=path --value=$path
fi
if [ -z "${password:-}" ]; then
password=$(ynh_string_random --length=32)
ynh_app_setting_set --app=$app --key=password --value="$password"
fi
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================