1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/galette_ynh.git synced 2024-09-03 18:36:28 +02:00
This commit is contained in:
ericgaspar 2021-12-01 13:08:18 +01:00
parent 930ce1b1d0
commit 079a0c95ba
No known key found for this signature in database
GPG key ID: 574F281483054D44
5 changed files with 16 additions and 14 deletions

View file

@ -26,7 +26,7 @@
"multi_instance": true,
"services": [
"nginx",
"php7.3-fpm"
"php7.4-fpm"
],
"arguments": {
"install": [

View file

@ -5,7 +5,7 @@
#=================================================
# dependencies used by the app
YNH_PHP_VERSION="7.3"
YNH_PHP_VERSION="7.4"
pkg_dependencies="postgresql php${YNH_PHP_VERSION}-tidy php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-pgsql php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-curl"

View file

@ -24,6 +24,7 @@ domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH
is_public=$YNH_APP_ARG_IS_PUBLIC
timezone="$(cat /etc/timezone)"
phpversion=$YNH_PHP_VERSION
app=$YNH_APP_INSTANCE_NAME
@ -45,6 +46,7 @@ ynh_script_progression --message="Storing installation settings..." --weight=1
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=phpversion --value=$phpversion
#=================================================
# INSTALL DEPENDENCIES
@ -98,7 +100,6 @@ ynh_add_nginx_config
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
ynh_add_fpm_config
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
# CONFIGURE GALETTE
@ -107,6 +108,9 @@ ynh_script_progression --message="Configuring Galette..." --weight=1
ynh_add_config --template="../conf/config.inc.php.dist" --destination="$final_path/galette/config/config.inc.php"
chmod 400 "$final_path/galette/config/config.inc.php"
chown $app:$app "$final_path/galette/config/config.inc.php"
#=================================================
# GENERIC FINALIZATION
#=================================================

View file

@ -30,14 +30,6 @@ ynh_script_progression --message="Removing the PostgreSQL database..." --weight=
# Remove a database if it exists, along with the associated user
ynh_psql_remove_db --db_user=$db_user --db_name=$db_name
#=================================================
# REMOVE DEPENDENCIES
#=================================================
ynh_script_progression --message="Removing dependencies..." --weight=1
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
#=================================================
# REMOVE APP MAIN DIR
#=================================================
@ -62,6 +54,14 @@ ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=3
# Remove the dedicated PHP-FPM config
ynh_remove_fpm_config
#=================================================
# REMOVE DEPENDENCIES
#=================================================
ynh_script_progression --message="Removing dependencies..." --weight=1
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
#=================================================
# REMOVE LOGROTATE CONFIGURATION
#=================================================

View file

@ -38,8 +38,7 @@ timezone="$(cat /etc/timezone)"
#=================================================
ynh_script_progression --message="Validating restoration parameters..." --weight=2
test ! -d $final_path \
|| ynh_die "There is already a directory: $final_path "
test ! -d $final_path || ynh_die "There is already a directory: $final_path "
#=================================================
# STANDARD RESTORATION STEPS
@ -75,7 +74,6 @@ chown -R $app:www-data "$final_path"
ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
ynh_add_fpm_config
#=================================================
# REINSTALL DEPENDENCIES