mirror of
https://github.com/YunoHost-Apps/etherpad_ynh.git
synced 2024-09-03 18:36:10 +02:00
Fix
This commit is contained in:
parent
5d9e8e81be
commit
79896e16e3
1 changed files with 22 additions and 10 deletions
|
@ -23,6 +23,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|||
language=$(ynh_app_setting_get --app=$app --key=language)
|
||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
password=$(ynh_app_setting_get --app=$app --key=password)
|
||||
export=$(ynh_app_setting_get --app=$app --key=export)
|
||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
|
||||
|
||||
|
@ -99,9 +100,9 @@ ynh_system_user_create --username=$app --home_dir="$final_path"
|
|||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||
|
||||
ynh_secure_remove --file="$final_path"
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/settings.json $final_path/credentials.json"
|
||||
ynh_setup_source --dest_dir="$final_path" #--keep="$final_path/settings.json $final_path/credentials.json"
|
||||
fi
|
||||
|
||||
# Set permissions on app files
|
||||
|
@ -109,6 +110,17 @@ chmod 750 "$final_path"
|
|||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading dependencies..." --weight=5
|
||||
|
||||
if [ "$export" = "abiword" ]; then
|
||||
ynh_exec_warn_less ynh_install_app_dependencies $abiword_app_depencencies
|
||||
elif [ "$export" = "libreoffice" ]; then
|
||||
ynh_exec_warn_less ynh_install_app_dependencies $libreoffice_app_dependencies
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -126,14 +138,14 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
|||
|
||||
ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
|
||||
# #=================================================
|
||||
# # MODIFY A CONFIG FILE
|
||||
# #=================================================
|
||||
# ynh_script_progression --message="Reconfiguring Etherpad..." --weight=6
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reconfiguring Etherpad..." --weight=6
|
||||
|
||||
# ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json"
|
||||
# ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json"
|
||||
# chmod 400 "$final_path/credentials.json"
|
||||
ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json"
|
||||
ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json"
|
||||
chmod 400 "$final_path/credentials.json"
|
||||
|
||||
#=================================================
|
||||
# INSTALL ETHERPAD
|
||||
|
@ -142,7 +154,7 @@ ynh_script_progression --message="Installing Etherpad..." --weight=90
|
|||
|
||||
pushd $final_path
|
||||
ynh_use_nodejs
|
||||
ynh_exec_as $app env "$ynh_node_load_PATH" src/bin/installDeps.sh
|
||||
ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" src/bin/installDeps.sh
|
||||
ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm cache clean --force
|
||||
ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm install --upgrade
|
||||
popd
|
||||
|
|
Loading…
Reference in a new issue