mirror of
https://github.com/YunoHost-Apps/etherpad_mypads_ynh.git
synced 2024-09-03 18:36:09 +02:00
Update upgrade
This commit is contained in:
parent
27f357c4d8
commit
60de584ff4
1 changed files with 13 additions and 14 deletions
|
@ -63,13 +63,13 @@ ynh_systemd_action --service_name=$app --action="stop"
|
||||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=2
|
ynh_script_progression --message="Ensuring downward compatibility..." --weight=2
|
||||||
|
|
||||||
# If abiword setting doesn't exist
|
# If abiword setting doesn't exist
|
||||||
if [ -z "$abiword" ]; then
|
if [ -z "${abiword:-}" ]; then
|
||||||
abiword=0
|
abiword=0
|
||||||
ynh_app_setting_set --app=$app --key=abiword --value=$abiword
|
ynh_app_setting_set --app=$app --key=abiword --value=$abiword
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If abiword setting exists
|
# If abiword setting exists
|
||||||
if [ -n "$abiword" ]; then
|
if [ -n "${abiword:-}" ]; then
|
||||||
if [ $abiword -eq 1 ]; then
|
if [ $abiword -eq 1 ]; then
|
||||||
export=abiword
|
export=abiword
|
||||||
fi
|
fi
|
||||||
|
@ -78,49 +78,49 @@ if [ -n "$abiword" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If export setting doesn't exist
|
# If export setting doesn't exist
|
||||||
if [ -z "$export" ]; then
|
if [ -z "${export:-}" ]; then
|
||||||
export=none
|
export=none
|
||||||
ynh_app_setting_set --app=$app --key=export --value=$export
|
ynh_app_setting_set --app=$app --key=export --value=$export
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If mypads setting doesn't exist
|
# If mypads setting doesn't exist
|
||||||
if [ -z "$mypads" ]; then
|
if [ -z "${mypads:-}" ]; then
|
||||||
mypads=1
|
mypads=1
|
||||||
ynh_app_setting_set --app=$app --key=mypads --value=$mypads
|
ynh_app_setting_set --app=$app --key=mypads --value=$mypads
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If useldap setting doesn't exist
|
# If useldap setting doesn't exist
|
||||||
if [ -z "$useldap" ]; then
|
if [ -z "${useldap:-}" ]; then
|
||||||
useldap=0
|
useldap=0
|
||||||
ynh_app_setting_set --app=$app --key=useldap --value=$useldap
|
ynh_app_setting_set --app=$app --key=useldap --value=$useldap
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If path setting doesn't exist
|
# If path setting doesn't exist
|
||||||
if [ -z "$path" ]; then
|
if [ -z "${path:-}" ]; then
|
||||||
path="/"
|
path="/"
|
||||||
ynh_app_setting_set --app=$app --key=path --value=$path
|
ynh_app_setting_set --app=$app --key=path --value=$path
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If overwrite_settings doesn't exist, create it
|
# If overwrite_settings doesn't exist, create it
|
||||||
if [ -z "$overwrite_settings" ]; then
|
if [ -z "${overwrite_settings:-}" ]; then
|
||||||
overwrite_settings=1
|
overwrite_settings=1
|
||||||
ynh_app_setting_set --app=$app --key=overwrite_settings --value=$overwrite_settings
|
ynh_app_setting_set --app=$app --key=overwrite_settings --value=$overwrite_settings
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If overwrite_credentials doesn't exist, create it
|
# If overwrite_credentials doesn't exist, create it
|
||||||
if [ -z "$overwrite_credentials" ]; then
|
if [ -z "${overwrite_credentials:-}" ]; then
|
||||||
overwrite_credentials=1
|
overwrite_credentials=1
|
||||||
ynh_app_setting_set --app=$app --key=overwrite_credentials --value=$overwrite_credentials
|
ynh_app_setting_set --app=$app --key=overwrite_credentials --value=$overwrite_credentials
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If overwrite_nginx doesn't exist, create it
|
# If overwrite_nginx doesn't exist, create it
|
||||||
if [ -z "$overwrite_nginx" ]; then
|
if [ -z "${overwrite_nginx:-}" ]; then
|
||||||
overwrite_nginx=1
|
overwrite_nginx=1
|
||||||
ynh_app_setting_set --app=$app --key=overwrite_nginx --value=$overwrite_nginx
|
ynh_app_setting_set --app=$app --key=overwrite_nginx --value=$overwrite_nginx
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If overwrite_systemd doesn't exist, create it
|
# If overwrite_systemd doesn't exist, create it
|
||||||
if [ -z "$overwrite_systemd" ]; then
|
if [ -z "${overwrite_systemd:-}" ]; then
|
||||||
overwrite_systemd=1
|
overwrite_systemd=1
|
||||||
ynh_app_setting_set --app=$app --key=overwrite_systemd --value=$overwrite_systemd
|
ynh_app_setting_set --app=$app --key=overwrite_systemd --value=$overwrite_systemd
|
||||||
fi
|
fi
|
||||||
|
@ -186,8 +186,8 @@ then
|
||||||
then
|
then
|
||||||
# Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script.
|
# Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script.
|
||||||
ynh_backup_if_checksum_is_different --file="$install_dir/settings.json"
|
ynh_backup_if_checksum_is_different --file="$install_dir/settings.json"
|
||||||
cp ../conf/settings.json "$install_dir/settings.json"
|
|
||||||
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$install_dir/settings.json"
|
ynh_add_config --template="../conf/settings.json" --destination="$install_dir/settings.json"
|
||||||
|
|
||||||
if [ "$export" = "abiword" ]
|
if [ "$export" = "abiword" ]
|
||||||
then
|
then
|
||||||
|
@ -208,7 +208,6 @@ then
|
||||||
language=en
|
language=en
|
||||||
ynh_app_setting_set --app=$app --key=language --value=$language
|
ynh_app_setting_set --app=$app --key=language --value=$language
|
||||||
fi
|
fi
|
||||||
ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$install_dir/settings.json"
|
|
||||||
|
|
||||||
# Use LDAP for MyPads
|
# Use LDAP for MyPads
|
||||||
if [ $mypads -eq 1 ] && [ $useldap -eq 1 ]
|
if [ $mypads -eq 1 ] && [ $useldap -eq 1 ]
|
||||||
|
@ -298,7 +297,7 @@ popd
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPGRADE NPM MODULES
|
# UPGRADE NPM MODULES
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading Etherpad..." --weight=60
|
ynh_script_progression --message="Upgrading Etherpad..." --weight=10
|
||||||
|
|
||||||
pushd $install_dir
|
pushd $install_dir
|
||||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH bin/installDeps.sh
|
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH bin/installDeps.sh
|
||||||
|
|
Loading…
Add table
Reference in a new issue