mirror of
https://github.com/YunoHost-Apps/abantecart_ynh.git
synced 2024-09-03 18:06:16 +02:00
cleaning
This commit is contained in:
parent
3ba8b014b1
commit
aebc8a413a
8 changed files with 21 additions and 77 deletions
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue