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:
parent
4a4b765f61
commit
c7a0b7d1aa
2 changed files with 5 additions and 6 deletions
|
@ -7,12 +7,12 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
|
source /usr/share/yunohost/helpers
|
||||||
source experimental_helpers/ynh_add_extra_apt_repos__3
|
source experimental_helpers/ynh_add_extra_apt_repos__3
|
||||||
source experimental_helpers/ynh_install_php__3
|
source experimental_helpers/ynh_install_php__3
|
||||||
source experimental_helpers/ynh_exec_as
|
source experimental_helpers/ynh_exec_as
|
||||||
source experimental_helpers/ynh_composer__2
|
source experimental_helpers/ynh_composer__2
|
||||||
source experimental_helpers/ynh_send_readme_to_admin__2
|
source experimental_helpers/ynh_send_readme_to_admin__2
|
||||||
source /usr/share/yunohost/helpers
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MANAGE SCRIPT FAILURE
|
# MANAGE SCRIPT FAILURE
|
||||||
|
@ -103,7 +103,7 @@ ynh_install_app_dependencies "$pkg_dependencies"
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
#===================================================
|
#===================================================
|
||||||
|
|
||||||
ynh_system_user_create $app $final_path 1
|
ynh_system_user_create $app $final_path
|
||||||
usermod -a -G www-data $app
|
usermod -a -G www-data $app
|
||||||
# Create working directory
|
# Create working directory
|
||||||
mkdir -p "$final_path/.composer"
|
mkdir -p "$final_path/.composer"
|
||||||
|
@ -120,7 +120,6 @@ ynh_install_composer $php_version $final_path
|
||||||
#=================================================
|
#=================================================
|
||||||
# FLARUM INSTALLATION
|
# FLARUM INSTALLATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Prepare Flarum temp directory
|
# Prepare Flarum temp directory
|
||||||
tmp=/tmp/$app
|
tmp=/tmp/$app
|
||||||
ynh_secure_remove --file="$tmp"
|
ynh_secure_remove --file="$tmp"
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
|
source /usr/share/yunohost/helpers
|
||||||
source experimental_helpers/ynh_add_extra_apt_repos__3
|
source experimental_helpers/ynh_add_extra_apt_repos__3
|
||||||
source experimental_helpers/ynh_install_php__3
|
source experimental_helpers/ynh_install_php__3
|
||||||
source experimental_helpers/ynh_exec_as
|
source experimental_helpers/ynh_exec_as
|
||||||
source experimental_helpers/ynh_composer__2
|
source experimental_helpers/ynh_composer__2
|
||||||
source experimental_helpers/ynh_send_readme_to_admin__2
|
source experimental_helpers/ynh_send_readme_to_admin__2
|
||||||
source /usr/share/yunohost/helpers
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# LOAD SETTINGS
|
# 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
|
ynh_script_progression --message="Making sure dedicated system user exists..." --time --weight=1
|
||||||
|
|
||||||
# Create a dedicated user (if not existing)
|
# Create a dedicated user (if not existing)
|
||||||
ynh_system_user_create --username=$app
|
ynh_system_user_create $app $final_path
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PHP-FPM CONFIGURATION
|
# PHP-FPM CONFIGURATION
|
||||||
|
@ -248,7 +248,7 @@ fi
|
||||||
|
|
||||||
# Perform migrations and clear cache
|
# Perform migrations and clear cache
|
||||||
pushd $final_path
|
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 migrate
|
||||||
exec_as $app php$php_version flarum cache:clear
|
exec_as $app php$php_version flarum cache:clear
|
||||||
popd
|
popd
|
||||||
|
|
Loading…
Add table
Reference in a new issue