mirror of
https://github.com/YunoHost-Apps/flarum_ynh.git
synced 2024-09-03 18:36:24 +02:00
Fix
This commit is contained in:
parent
af6d8109d5
commit
7f9b4457d0
5 changed files with 27 additions and 43 deletions
|
@ -92,8 +92,8 @@ Reload PHP-FPM with `sudo service php*php_version*-fpm reload`.
|
|||
|
||||
#### Supported architectures
|
||||
|
||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/flarum/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/flarum/)
|
||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/flarum/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/flarum/)
|
||||
|
||||
## Links
|
||||
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
|
||||
# dependencies used by the app
|
||||
pkg_dependencies=""
|
||||
|
||||
swap_needed=1024
|
||||
|
||||
YNH_PHP_VERSION="7.3"
|
||||
|
|
|
@ -60,15 +60,6 @@ ynh_app_setting_set --app=$app --key=project_version --value=$project_version
|
|||
ynh_app_setting_set --app=$app --key=core_version --value=$core_version
|
||||
ynh_app_setting_set --app=$app --key=ldap_version --value=$ldap_version
|
||||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing dependencies..." --weight=2
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# CREATE A MYSQL DATABASE
|
||||
#=================================================
|
||||
|
@ -103,8 +94,6 @@ ynh_script_progression --message="Configuring system user..." --weight=1
|
|||
|
||||
# Create a system user
|
||||
ynh_system_user_create --username=$app --home_dir=$final_path
|
||||
# Adding it to www-data group
|
||||
usermod -a -G www-data $app
|
||||
|
||||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
|
@ -146,9 +135,9 @@ ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_p
|
|||
ynh_script_progression --message="Securing files and directories..."
|
||||
|
||||
# Set permissions to app files
|
||||
chown -R $app:www-data $final_path
|
||||
chmod -R ug+rw,o-rwx $final_path
|
||||
chmod -R ug+x $final_path/flarum
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# FLARUM POST-INSTALL
|
||||
|
|
|
@ -51,13 +51,6 @@ ynh_script_progression --message="Restoring the nginx configuration..."
|
|||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the app main directory..." --weight=1
|
||||
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
|
||||
#=================================================
|
||||
# RECREATE THE DEDICATED USER
|
||||
#=================================================
|
||||
|
@ -66,15 +59,22 @@ ynh_script_progression --message="Recreating the dedicated system user..." --wei
|
|||
# Create the dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the app main directory..." --weight=1
|
||||
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
|
||||
#=================================================
|
||||
# RESTORE USER RIGHTS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring user rights..."
|
||||
|
||||
# Set right permissions
|
||||
chown -R $app:www-data $final_path
|
||||
chmod -R ug+rw,o-rwx $final_path
|
||||
chmod -R ug+x $final_path/flarum
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
|
|
|
@ -75,6 +75,14 @@ if [ ! -z "$ssowat_extension" ]; then
|
|||
ynh_app_setting_delete --app=$app --key=ssowat_extension
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
|
||||
|
||||
# Create a dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app --home_dir=$final_path
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
|
@ -127,7 +135,7 @@ fi
|
|||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=1
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
|
||||
|
||||
# Create a dedicated nginx config
|
||||
ynh_add_nginx_config
|
||||
|
@ -139,16 +147,6 @@ ynh_script_progression --message="Upgrading dependencies..." --weight=2
|
|||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
|
||||
|
||||
# Create a dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app --home_dir=$final_path
|
||||
# Adding it to www-data group
|
||||
usermod -a -G www-data $app
|
||||
|
||||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -249,9 +247,9 @@ ynh_use_logrotate --non-append
|
|||
ynh_script_progression --message="Securing files and directories..."
|
||||
|
||||
# Set permissions on app files
|
||||
chown -R $app:www-data $final_path
|
||||
chmod -R ug+rw,o-rwx $final_path
|
||||
chmod -R ug+x $final_path/flarum
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
|
|
Loading…
Add table
Reference in a new issue