1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/flarum_ynh.git synced 2024-09-03 18:36:24 +02:00

[fix] user creation with directory

and [enh] reorder helpers
This commit is contained in:
tituspijean 2020-04-18 23:06:04 +02:00
parent 4a4b765f61
commit c7a0b7d1aa
2 changed files with 5 additions and 6 deletions

View file

@ -7,12 +7,12 @@
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
source experimental_helpers/ynh_add_extra_apt_repos__3
source experimental_helpers/ynh_install_php__3
source experimental_helpers/ynh_exec_as
source experimental_helpers/ynh_composer__2
source experimental_helpers/ynh_send_readme_to_admin__2
source /usr/share/yunohost/helpers
#=================================================
# MANAGE SCRIPT FAILURE
@ -103,7 +103,7 @@ ynh_install_app_dependencies "$pkg_dependencies"
# CREATE DEDICATED USER
#===================================================
ynh_system_user_create $app $final_path 1
ynh_system_user_create $app $final_path
usermod -a -G www-data $app
# Create working directory
mkdir -p "$final_path/.composer"
@ -120,7 +120,6 @@ ynh_install_composer $php_version $final_path
#=================================================
# FLARUM INSTALLATION
#=================================================
# Prepare Flarum temp directory
tmp=/tmp/$app
ynh_secure_remove --file="$tmp"

View file

@ -7,12 +7,12 @@
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
source experimental_helpers/ynh_add_extra_apt_repos__3
source experimental_helpers/ynh_install_php__3
source experimental_helpers/ynh_exec_as
source experimental_helpers/ynh_composer__2
source experimental_helpers/ynh_send_readme_to_admin__2
source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
@ -162,7 +162,7 @@ ynh_install_app_dependencies "$pkg_dependencies"
ynh_script_progression --message="Making sure dedicated system user exists..." --time --weight=1
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app
ynh_system_user_create $app $final_path
#=================================================
# PHP-FPM CONFIGURATION
@ -248,7 +248,7 @@ fi
# Perform migrations and clear cache
pushd $final_path
ynh_composer_exec $app $php_version $final_path "update --prefer-dist --no-dev -o --with-all-dependencies"
ynh_composer_exec $app $php_version $final_path "update --prefer-dist --no-dev -a --with-all-dependencies"
exec_as $app php$php_version flarum migrate
exec_as $app php$php_version flarum cache:clear
popd