diff --git a/config_panel.toml b/config_panel.toml.example similarity index 100% rename from config_panel.toml rename to config_panel.toml.example diff --git a/doc/ADMIN.md b/doc/ADMIN.md index aa62714..6e5581d 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -1,4 +1,4 @@ ### Important points to read before installing -- Do not upgrade manually within the app, upgrade with Yunohost instead! -- Admin interface will be available at https://domain.tld/?s=admin +- Do not upgrade manually within the app, upgrade with YunoHost instead! +- Admin interface will be available at https://__DOMAIN__/?s=admin diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index b8606e0..db2b23e 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -1 +1 @@ -AbanteCart is a free open source ecommerce platform to power online retail. AbanteCart is a ready to run web application as well as reliable foundation to build custom eCommerce solutions. AbanteCart ecommerce platform is designed to fit a wide variety of online businesses and applications, as well as can be configured or customized to perform very specific business requirements. Chosen by many shop owners launching their business online for the first time, AbanteCart is also picked by developers looking for a user-friendly interface and powerful features set. +AbanteCart is a ecommerce platform to power online retail. AbanteCart is a ready to run web application as well as reliable foundation to build custom eCommerce solutions. AbanteCart ecommerce platform is designed to fit a wide variety of online businesses and applications, as well as can be configured or customized to perform very specific business requirements. Chosen by many shop owners launching their business online for the first time, AbanteCart is also picked by developers looking for a user-friendly interface and powerful features set. diff --git a/manifest.toml b/manifest.toml index 78bc66a..e21c3e9 100644 --- a/manifest.toml +++ b/manifest.toml @@ -56,7 +56,7 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "mariadb-server php8.2-iconv php8.2-mbstring php8.2-mysqli php8.2-zip php8.2-curl php8.2-gd php8.2-soap php8.2-xml libwebp-dev libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libpng-dev libxpm-dev libonig-dev libzip-dev mc net-tools libxml2-dev" + packages = "mariadb-server, php8.2-iconv, php8.2-mbstring, php8.2-mysqli, php8.2-zip, php8.2-curl, php8.2-gd, php8.2-soap, php8.2-xml, libwebp-dev, libfreetype6-dev, libjpeg62-turbo-dev, libmcrypt-dev, libpng-dev, libxpm-dev, libonig-dev, libzip-dev, mc, net-tools, libxml2-dev" [resources.database] type = "mysql" 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/install b/scripts/install index bdd4030..0a683e5 100644 --- a/scripts/install +++ b/scripts/install @@ -13,10 +13,6 @@ source /usr/share/yunohost/helpers # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -fpm_footprint="low" -fpm_free_footprint=0 -fpm_usage="low" - email=$(ynh_user_get_info --username=$admin --key=mail) src_version=$(ynh_app_upstream_version) @@ -25,9 +21,6 @@ src_version=$(ynh_app_upstream_version) #================================================= ynh_app_setting_set --app=$app --key=src_version --value=$src_version -ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint -ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint -ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -49,12 +42,7 @@ find $install_dir/www -type f -exec chmod 644 {} \; ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint - -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=2 +ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config diff --git a/scripts/restore b/scripts/restore index 53441f0..d18bc98 100644 --- a/scripts/restore +++ b/scripts/restore @@ -22,20 +22,6 @@ chown -R $app:www-data "$install_dir" find $install_dir/www -type d -exec chmod 755 {} \; find $install_dir/www -type f -exec chmod 644 {} \; -#================================================= -# RESTORE THE PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=2 - -ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" - -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RESTORE THE MYSQL DATABASE #================================================= @@ -43,6 +29,15 @@ ynh_script_progression --message="Restoring the MySQL database..." --weight=1 ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql +#================================================= +# RESTORE SYSTEM CONFIGURATIONS +#================================================= +ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 + +ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 11afed8..7f810b7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,48 +9,13 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - -#================================================= -# STANDARD UPGRADE STEPS -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 - -# If fpm_footprint doesn't exist, create it -if [ -z "${fpm_footprint:-}" ]; then - fpm_footprint=low - ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint -fi - -# If fpm_free_footprint doesn't exist, create it -if [ -z "${fpm_free_footprint:-}" ]; then - fpm_free_footprint=0 - ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint -fi - -# If fpm_usage doesn't exist, create it -if [ -z "${fpm_usage:-}" ]; then - fpm_usage=low - ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage -fi - #================================================= # 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/git_src" -fi +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir/git_src" ynh_secure_remove $install_dir/www/install @@ -63,12 +28,12 @@ find $install_dir/www -type f -exec chmod 644 {} \; ln -s $install_dir/git_src/public_html $install_dir/www #================================================= -# PHP-FPM CONFIGURATION +# UPDATE A CONFIG FILE #================================================= -ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 +ynh_script_progression --message="Updating $app's configuration files..." --weight=1 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint +ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config