mirror of
https://github.com/YunoHost-Apps/galette_ynh.git
synced 2024-09-03 18:36:28 +02:00
Fix
This commit is contained in:
parent
a89cae41cf
commit
8c84b84bb6
1 changed files with 7 additions and 53 deletions
|
@ -111,6 +111,13 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
|
|||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading dependencies..." --weight=1
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -134,10 +141,6 @@ ynh_use_logrotate --non-append
|
|||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
|
||||
# TODO: improve permissions
|
||||
|
||||
chown -R root: "$final_path"
|
||||
|
||||
chown "$app" "$final_path/config"
|
||||
chmod 750 "$final_path/config"
|
||||
|
||||
|
@ -147,30 +150,6 @@ do
|
|||
chmod 750 "$final_path/data/$folder"
|
||||
done
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
|
||||
if [[ "$path_url" == "/" ]]
|
||||
then
|
||||
# ynh panel is only comptable with non-root installation
|
||||
ynh_replace_string " include conf.d/" " #include conf.d/" "$finalnginxconf"
|
||||
else
|
||||
ynh_replace_string "^#sub_path_only" "" "$finalnginxconf"
|
||||
fi
|
||||
ynh_store_file_checksum "$finalnginxconf"
|
||||
|
||||
if [ $is_public -eq 0 ]
|
||||
then # Remove the public access
|
||||
ynh_app_setting_delete "$app" skipped_uris
|
||||
fi
|
||||
# Make app public if necessary
|
||||
if [ $is_public -eq 1 ]
|
||||
then
|
||||
# unprotected_uris allows SSO credentials to be passed anyway
|
||||
ynh_app_setting_set "$app" skipped_uris "/"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
@ -180,33 +159,8 @@ ynh_script_progression --message="Reloading NGINX web server..." --weight=2
|
|||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
#=================================================
|
||||
# SEND A README FOR THE ADMIN
|
||||
#=================================================
|
||||
|
||||
message="Galette need you to finish the update manually.
|
||||
|
||||
Please open "$domain/$path_url" and finish the upgrade process.
|
||||
|
||||
You may need database information:
|
||||
Type: mysql
|
||||
Host: localhost
|
||||
Port: 3306
|
||||
User: "$db_name"
|
||||
Password: "$db_pwd"
|
||||
Name: "$db_name"
|
||||
|
||||
Important! Once done, please remember to run as root or with sudo:
|
||||
\`chmod -R 500 "$final_path/config"\`
|
||||
\`rm -fr "$final_path/install"\`
|
||||
|
||||
If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/galette_ynh"
|
||||
|
||||
ynh_send_readme_to_admin "$message"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Upgrade of $app completed" --last
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue