mirror of
https://github.com/YunoHost-Apps/flarum_ynh.git
synced 2024-09-03 18:36:24 +02:00
ynh_exec_as
This commit is contained in:
parent
e7973478aa
commit
d07d3834f0
2 changed files with 5 additions and 12 deletions
|
@ -149,7 +149,7 @@ ynh_add_config --template="../conf/configuration.yml" --destination="$final_path
|
||||||
|
|
||||||
# Execute post-installation
|
# Execute post-installation
|
||||||
pushd $final_path
|
pushd $final_path
|
||||||
exec_as $app php$phpversion -d $final_path -d memory_limit=-1 flarum install -f configuration.yml
|
ynh_exec_as $app php$phpversion -d $final_path -d memory_limit=-1 flarum install -f configuration.yml
|
||||||
# Delete configuration.yml as it contains sensitive data
|
# Delete configuration.yml as it contains sensitive data
|
||||||
ynh_secure_remove --file="$final_path/configuration.yml"
|
ynh_secure_remove --file="$final_path/configuration.yml"
|
||||||
popd
|
popd
|
||||||
|
|
|
@ -140,13 +140,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# UPGRADE DEPENDENCIES
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Upgrading dependencies..." --weight=2
|
|
||||||
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PHP-FPM CONFIGURATION
|
# PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -184,8 +177,8 @@ then
|
||||||
ynh_script_progression --message="Upgrading Flarum and its extensions..." --weight=1
|
ynh_script_progression --message="Upgrading Flarum and its extensions..." --weight=1
|
||||||
ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"require tituspijean/flarum-ext-auth-ldap:$ldap_version --no-update\"
|
ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"require tituspijean/flarum-ext-auth-ldap:$ldap_version --no-update\"
|
||||||
ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"require flarum/core:$core_version --prefer-dist --update-no-dev -a --update-with-all-dependencies\"
|
ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"require flarum/core:$core_version --prefer-dist --update-no-dev -a --update-with-all-dependencies\"
|
||||||
exec_as $app php$phpversion flarum migrate
|
ynh_exec_as $app php$phpversion flarum migrate
|
||||||
exec_as $app php$phpversion flarum cache:clear
|
ynh_exec_as $app php$phpversion flarum cache:clear
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -193,7 +186,7 @@ fi
|
||||||
# FLARUM EXTENSIONS
|
# FLARUM EXTENSIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
if ! exec_as $app php$phpversion flarum info | grep -q "tituspijean-auth-ldap" | grep -q $ldap_version;
|
if ! ynh_exec_as $app php$phpversion flarum info | grep -q "tituspijean-auth-ldap" | grep -q $ldap_version;
|
||||||
then
|
then
|
||||||
# Install and activate the LDAP auth extension
|
# Install and activate the LDAP auth extension
|
||||||
activate_flarum_extension $db_name "tituspijean-auth-ldap"
|
activate_flarum_extension $db_name "tituspijean-auth-ldap"
|
||||||
|
@ -223,7 +216,7 @@ ynh_print_info "You may need to manually enable your language extension in Flaru
|
||||||
|
|
||||||
# Clear cache
|
# Clear cache
|
||||||
pushd $final_path
|
pushd $final_path
|
||||||
exec_as $app php$phpversion flarum cache:clear
|
ynh_exec_as $app php$phpversion flarum cache:clear
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Save version settings
|
# Save version settings
|
||||||
|
|
Loading…
Add table
Reference in a new issue