This commit is contained in:
Éric Gaspar 2024-07-07 14:23:24 +02:00
parent 83e2ef6034
commit 1c947fcd0e
4 changed files with 8 additions and 16 deletions

View File

@ -22,15 +22,11 @@ ynh_print_info --message="Declaring files to be backed up..."
ynh_backup --src_path="$install_dir"
#=================================================
# BACKUP THE NGINX CONFIGURATION
# SYSTEM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP THE PHP-FPM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================

View File

@ -26,7 +26,7 @@ ynh_change_url_nginx_config
ynh_script_progression --message="Updating a configuration file..." --weight=1
domain=$new_domain
ynh_add_config --template="../conf/config.php" --destination="$install_dir/config.php"
ynh_add_config --template="config.php" --destination="$install_dir/config.php"
chmod 400 "$install_dir/config.php"
chown $app:$app "$install_dir/config.php"

View File

@ -30,7 +30,7 @@ ynh_script_progression --message="Adding system configurations related to $app..
ynh_add_nginx_config
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=low --footprint=low
ynh_add_fpm_config
#=================================================
# SPECIFIC SETUP
@ -39,7 +39,7 @@ ynh_add_fpm_config --usage=low --footprint=low
#=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_add_config --template="../conf/config.php" --destination="$install_dir/config.php"
ynh_add_config --template="config.php" --destination="$install_dir/config.php"
chmod 400 "$install_dir/config.php"
chown $app "$install_dir/config.php"

View File

@ -18,14 +18,10 @@ upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Upgrading source files..." --weight=1
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --keep="config.php storage/"
fi
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --keep="config.php storage/"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
@ -40,7 +36,7 @@ ynh_script_progression --message="Upgrading system configurations related to $ap
ynh_add_nginx_config
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=low --footprint=low
ynh_add_fpm_config
#=================================================
# END OF SCRIPT