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
|
||||
|
||||
# If abiword setting doesn't exist
|
||||
if [ -z "$abiword" ]; then
|
||||
if [ -z "${abiword:-}" ]; then
|
||||
abiword=0
|
||||
ynh_app_setting_set --app=$app --key=abiword --value=$abiword
|
||||
fi
|
||||
|
||||
# If abiword setting exists
|
||||
if [ -n "$abiword" ]; then
|
||||
if [ -n "${abiword:-}" ]; then
|
||||
if [ $abiword -eq 1 ]; then
|
||||
export=abiword
|
||||
fi
|
||||
|
@ -78,49 +78,49 @@ if [ -n "$abiword" ]; then
|
|||
fi
|
||||
|
||||
# If export setting doesn't exist
|
||||
if [ -z "$export" ]; then
|
||||
if [ -z "${export:-}" ]; then
|
||||
export=none
|
||||
ynh_app_setting_set --app=$app --key=export --value=$export
|
||||
fi
|
||||
|
||||
# If mypads setting doesn't exist
|
||||
if [ -z "$mypads" ]; then
|
||||
if [ -z "${mypads:-}" ]; then
|
||||
mypads=1
|
||||
ynh_app_setting_set --app=$app --key=mypads --value=$mypads
|
||||
fi
|
||||
|
||||
# If useldap setting doesn't exist
|
||||
if [ -z "$useldap" ]; then
|
||||
if [ -z "${useldap:-}" ]; then
|
||||
useldap=0
|
||||
ynh_app_setting_set --app=$app --key=useldap --value=$useldap
|
||||
fi
|
||||
|
||||
# If path setting doesn't exist
|
||||
if [ -z "$path" ]; then
|
||||
if [ -z "${path:-}" ]; then
|
||||
path="/"
|
||||
ynh_app_setting_set --app=$app --key=path --value=$path
|
||||
fi
|
||||
|
||||
# If overwrite_settings doesn't exist, create it
|
||||
if [ -z "$overwrite_settings" ]; then
|
||||
if [ -z "${overwrite_settings:-}" ]; then
|
||||
overwrite_settings=1
|
||||
ynh_app_setting_set --app=$app --key=overwrite_settings --value=$overwrite_settings
|
||||
fi
|
||||
|
||||
# If overwrite_credentials doesn't exist, create it
|
||||
if [ -z "$overwrite_credentials" ]; then
|
||||
if [ -z "${overwrite_credentials:-}" ]; then
|
||||
overwrite_credentials=1
|
||||
ynh_app_setting_set --app=$app --key=overwrite_credentials --value=$overwrite_credentials
|
||||
fi
|
||||
|
||||
# If overwrite_nginx doesn't exist, create it
|
||||
if [ -z "$overwrite_nginx" ]; then
|
||||
if [ -z "${overwrite_nginx:-}" ]; then
|
||||
overwrite_nginx=1
|
||||
ynh_app_setting_set --app=$app --key=overwrite_nginx --value=$overwrite_nginx
|
||||
fi
|
||||
|
||||
# If overwrite_systemd doesn't exist, create it
|
||||
if [ -z "$overwrite_systemd" ]; then
|
||||
if [ -z "${overwrite_systemd:-}" ]; then
|
||||
overwrite_systemd=1
|
||||
ynh_app_setting_set --app=$app --key=overwrite_systemd --value=$overwrite_systemd
|
||||
fi
|
||||
|
@ -186,8 +186,8 @@ then
|
|||
then
|
||||
# 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"
|
||||
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" ]
|
||||
then
|
||||
|
@ -208,7 +208,6 @@ then
|
|||
language=en
|
||||
ynh_app_setting_set --app=$app --key=language --value=$language
|
||||
fi
|
||||
ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$install_dir/settings.json"
|
||||
|
||||
# Use LDAP for MyPads
|
||||
if [ $mypads -eq 1 ] && [ $useldap -eq 1 ]
|
||||
|
@ -298,7 +297,7 @@ popd
|
|||
#=================================================
|
||||
# UPGRADE NPM MODULES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading Etherpad..." --weight=60
|
||||
ynh_script_progression --message="Upgrading Etherpad..." --weight=10
|
||||
|
||||
pushd $install_dir
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH bin/installDeps.sh
|
||||
|
|
Loading…
Add table
Reference in a new issue