diff --git a/scripts/backup b/scripts/backup index 214b288..30f2c81 100644 --- a/scripts/backup +++ b/scripts/backup @@ -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" #================================================= diff --git a/scripts/change_url b/scripts/change_url index e976fa8..d7fc5ac 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -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" diff --git a/scripts/install b/scripts/install index 5d35ee6..d6418e6 100644 --- a/scripts/install +++ b/scripts/install @@ -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" diff --git a/scripts/upgrade b/scripts/upgrade index 5251726..18cc682 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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