From 1ddbe0a457946135374df1efeeee71acbedba4f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 23 Jun 2024 14:36:05 +0200 Subject: [PATCH 1/3] Update READMEs --- ALL_README.md | 1 + README.md | 4 ++++ README_es.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++ README_eu.md | 4 ++++ README_fr.md | 4 ++++ README_gl.md | 4 ++++ README_zh_Hans.md | 6 +++++- 7 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 README_es.md diff --git a/ALL_README.md b/ALL_README.md index a01b345..152f2e7 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,6 +1,7 @@ # All available README files by language - [Read the README in English](README.md) +- [Lea el README en español](README_es.md) - [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) diff --git a/README.md b/README.md index 0650977..d7dafe9 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,10 @@ Sitemagic is a Content Management System. It's very unique in its approach to de ![Screenshot of Sitemagic CMS](./doc/screenshots/Designer.jpeg) +## :red_circle: Antifeatures + +- **Upstream not maintained**: This software is not maintained anymore. Expect it to break down over time, be exposed to unfixed security breaches, etc. + ## Documentation and resources - Official app website: diff --git a/README_es.md b/README_es.md new file mode 100644 index 0000000..6bf0b21 --- /dev/null +++ b/README_es.md @@ -0,0 +1,51 @@ + + +# Sitemagic CMS para Yunohost + +[![Nivel de integración](https://dash.yunohost.org/integration/sitemagiccms.svg)](https://dash.yunohost.org/appci/app/sitemagiccms) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/sitemagiccms.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/sitemagiccms.maintain.svg) + +[![Instalar Sitemagic CMS con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=sitemagiccms) + +*[Leer este README en otros idiomas.](./ALL_README.md)* + +> *Este paquete le permite instalarSitemagic CMS rapidamente y simplement en un servidor YunoHost.* +> *Si no tiene YunoHost, visita [the guide](https://yunohost.org/install) para aprender como instalarla.* + +## Descripción general + +Sitemagic is a Content Management System. It's very unique in its approach to design. Sitemagic CMS is a comprehensive Content Management System that allows anyone to easily manage pages, files, menu, forms, and external modules such as maps, social media plugins, videos, and more. But there's also a ton of hidden features that helps you save time such as automatic mobile and search engine optimizations (SEO). + +**Versión actual:** 4.4.2~ynh5 + +## Capturas + +![Captura de Sitemagic CMS](./doc/screenshots/Designer.jpeg) + +## :red_circle: Características no deseables + +- **Upstream not maintained**: This software is not maintained anymore. Expect it to break down over time, be exposed to unfixed security breaches, etc. + +## Documentaciones y recursos + +- Sitio web oficial: +- Documentación administrador oficial: +- Repositorio del código fuente oficial de la aplicación : +- Catálogo YunoHost: +- Reportar un error: + +## Información para desarrolladores + +Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/sitemagiccms_ynh/tree/testing + +Para probar la rama `testing`, sigue asÍ: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/sitemagiccms_ynh/tree/testing --debug +o +sudo yunohost app upgrade sitemagiccms -u https://github.com/YunoHost-Apps/sitemagiccms_ynh/tree/testing --debug +``` + +**Mas informaciones sobre el empaquetado de aplicaciones:** diff --git a/README_eu.md b/README_eu.md index f53c168..4f413dd 100644 --- a/README_eu.md +++ b/README_eu.md @@ -24,6 +24,10 @@ Sitemagic is a Content Management System. It's very unique in its approach to de ![Sitemagic CMS(r)en pantaila-argazkia](./doc/screenshots/Designer.jpeg) +## :red_circle: Ezaugarri zalantzagarriak + +- **Jatorrizko garapena utzita**: Software honek ez du arduradunik. Denborak aurrera egin ahala funtzionatzeari utziko dio, konpondu gabeko segurtasun arazoak izango ditu, etab. + ## Dokumentazioa eta baliabideak - Aplikazioaren webgune ofiziala: diff --git a/README_fr.md b/README_fr.md index b6d5f05..73010a0 100644 --- a/README_fr.md +++ b/README_fr.md @@ -24,6 +24,10 @@ Sitemagic is a Content Management System. It's very unique in its approach to de ![Capture d’écran de Sitemagic CMS](./doc/screenshots/Designer.jpeg) +## :red_circle: Anti-fonctionnalités + +- **Application non maintenue **: Ce logiciel n'est plus maintenu. Attendez-vous à ce qu'il ne fonctionne plus avec le temps, et que l'on découvre des failles de sécurité qui ne seront pas corrigées, etc. + ## Documentations et ressources - Site officiel de l’app : diff --git a/README_gl.md b/README_gl.md index f636006..4f75c28 100644 --- a/README_gl.md +++ b/README_gl.md @@ -24,6 +24,10 @@ Sitemagic is a Content Management System. It's very unique in its approach to de ![Captura de pantalla de Sitemagic CMS](./doc/screenshots/Designer.jpeg) +## :red_circle: Debes considerar + +- **Upstream not maintained**: This software is not maintained anymore. Expect it to break down over time, be exposed to unfixed security breaches, etc. + ## Documentación e recursos - Web oficial da app: diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 4d0adf0..b12d558 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -3,7 +3,7 @@ 请勿手动编辑。 --> -# YunoHost 的 Sitemagic CMS +# YunoHost 上的 Sitemagic CMS [![集成程度](https://dash.yunohost.org/integration/sitemagiccms.svg)](https://dash.yunohost.org/appci/app/sitemagiccms) ![工作状态](https://ci-apps.yunohost.org/ci/badges/sitemagiccms.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/sitemagiccms.maintain.svg) @@ -24,6 +24,10 @@ Sitemagic is a Content Management System. It's very unique in its approach to de ![Sitemagic CMS 的截图](./doc/screenshots/Designer.jpeg) +## :red_circle: 负面特征 + +- **Upstream not maintained**: This software is not maintained anymore. Expect it to break down over time, be exposed to unfixed security breaches, etc. + ## 文档与资源 - 官方应用网站: From 25c2c13ebe5628a43fe17ebc2f94671801acd017 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sat, 31 Aug 2024 03:01:37 +0200 Subject: [PATCH 2/3] [autopatch] Automatic patch attempt for helpers 2.1 --- conf/extra_php-fpm.conf | 10 +++----- conf/nginx.conf | 2 +- manifest.toml | 4 ++- scripts/_common.sh | 14 +---------- scripts/backup | 23 ++++++----------- scripts/change_url | 12 +++------ scripts/install | 29 ++++++++-------------- scripts/remove | 14 +++-------- scripts/restore | 39 +++++++++++------------------ scripts/upgrade | 40 ++++++++++-------------------- sources/extra_files/app/.gitignore | 2 -- sources/patches/.gitignore | 2 -- 12 files changed, 62 insertions(+), 129 deletions(-) delete mode 100644 sources/extra_files/app/.gitignore delete mode 100644 sources/patches/.gitignore diff --git a/conf/extra_php-fpm.conf b/conf/extra_php-fpm.conf index 33d9032..e135bef 100644 --- a/conf/extra_php-fpm.conf +++ b/conf/extra_php-fpm.conf @@ -1,7 +1,7 @@ ; Start a new pool named 'www'. ; the variable $pool can be used in any directive and will be replaced by the ; pool name ('www' here) -[__NAMETOCHANGE__] +[__APP__] ; Per pool prefix ; It only applies on the following directives: @@ -20,8 +20,8 @@ ; Unix user/group of processes ; Note: The user is mandatory. If the group is not set, the default user's group ; will be used. -user = __USER__ -group = __USER__ +user = __APP__ +group = __APP__ ; The address on which to accept FastCGI requests. ; Valid syntaxes are: @@ -33,7 +33,7 @@ group = __USER__ ; (IPv6 and IPv4-mapped) on a specific port; ; '/path/to/unix/socket' - to listen on a unix socket. ; Note: This value is mandatory. -listen = /var/run/php/php__PHPVERSION__-fpm-__NAMETOCHANGE__.sock +listen = /var/run/php/php__PHP_VERSION__-fpm-__APP__.sock ; Set listen(2) backlog. ; Default Value: 511 (-1 on FreeBSD and OpenBSD) @@ -419,8 +419,6 @@ chdir = __INSTALL_DIR__ ;php_admin_value[memory_limit] = 32M ; Common values to change to increase file upload limit -php_admin_value[upload_max_filesize] = 50M -php_admin_value[post_max_size] = 50M ; php_admin_flag[mail.add_x_header] = Off ; Other common parameters diff --git a/conf/nginx.conf b/conf/nginx.conf index 0bdbf11..67dad62 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -12,7 +12,7 @@ location __PATH__/ { try_files $uri $uri/ index.php; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; + fastcgi_pass unix:/var/run/php/php__PHP_VERSION__-fpm-__APP__.sock; fastcgi_index index.php; include fastcgi_params; diff --git a/manifest.toml b/manifest.toml index 6af2e40..2584f91 100644 --- a/manifest.toml +++ b/manifest.toml @@ -16,7 +16,8 @@ admindoc = "https://sitemagic.org/sites/cms-guide/" code = "https://github.com/Jemt/SitemagicCMS" [integration] -yunohost = ">= 11.2" +yunohost = ">= 11.2.18" +helpers_version = "2.1" architectures = "all" multi_instance = true @@ -62,6 +63,7 @@ ram.runtime = "50M" [resources.system_user] [resources.install_dir] + group = "www-data:r-x" [resources.permissions] main.url = "/" diff --git a/scripts/_common.sh b/scripts/_common.sh index 944a65e..3d7f008 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,17 +1,5 @@ #!/bin/bash #================================================= -# COMMON VARIABLES -#================================================= - -#================================================= -# PERSONAL HELPERS -#================================================= - -#================================================= -# EXPERIMENTAL HELPERS -#================================================= - -#================================================= -# FUTURE OFFICIAL HELPERS +# COMMON VARIABLES AND CUSTOM HELPERS #================================================= diff --git a/scripts/backup b/scripts/backup index 214b288..5f6ebae 100755 --- a/scripts/backup +++ b/scripts/backup @@ -1,47 +1,38 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - # Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# DECLARE DATA AND CONF FILES TO BACKUP -#================================================= -ynh_print_info --message="Declaring files to be backed up..." +ynh_print_info "Declaring files to be backed up..." #================================================= # BACKUP THE APP MAIN DIR #================================================= -ynh_backup --src_path="$install_dir" +ynh_backup "$install_dir" #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= -ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_backup "/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" +ynh_backup "/etc/php/$php_version/fpm/pool.d/$app.conf" #================================================= # BACKUP THE MYSQL DATABASE #================================================= -ynh_print_info --message="Backing up the MySQL database..." +ynh_print_info "Backing up the MySQL database..." -ynh_mysql_dump_db --database="$db_name" > db.sql +ynh_mysql_dump_db > db.sql #================================================= # END OF SCRIPT #================================================= -ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." +ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/change_url b/scripts/change_url index 4ba8cf7..39d37fc 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -1,23 +1,17 @@ #!/bin/bash -#================================================= -# GENERIC STARTING -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 +ynh_script_progression "Updating NGINX web server configuration..." -ynh_change_url_nginx_config +ynh_config_change_url_nginx #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Change of URL completed for $app" --last +ynh_script_progression "Change of URL completed for $app" diff --git a/scripts/install b/scripts/install index a59a321..839a5e0 100755 --- a/scripts/install +++ b/scripts/install @@ -1,48 +1,41 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Setting up source files..." --weight=3 +ynh_script_progression "Setting up source files..." # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" - +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 +ynh_script_progression "Configuring PHP-FPM..." # Create a dedicated PHP-FPM config -ynh_add_fpm_config +ynh_config_add_phpfpm # Create a dedicated NGINX config -ynh_add_nginx_config +ynh_config_add_nginx #================================================= # ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Adding a configuration file..." --weight=1 +ynh_script_progression "Adding $app's configuration..." -ynh_add_config --template="config.xml.php" --destination="$install_dir/config.xml.php" +ynh_config_add --template="config.xml.php" --destination="$install_dir/config.xml.php" -chmod 660 "$install_dir/config.xml.php" -chown $app:$app "$install_dir/config.xml.php" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 660 "$install_dir/config.xml.php" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app:$app "$install_dir/config.xml.php" #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" --last +ynh_script_progression "Installation of $app completed" diff --git a/scripts/remove b/scripts/remove index 61db822..0201b35 100755 --- a/scripts/remove +++ b/scripts/remove @@ -1,27 +1,21 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 +ynh_script_progression "Removing NGINX web server configuration..." # Remove the dedicated NGINX config -ynh_remove_nginx_config +ynh_config_remove_nginx # Remove the dedicated PHP-FPM config -ynh_remove_fpm_config +ynh_config_remove_phpfpm #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of $app completed" --last +ynh_script_progression "Removal of $app completed" diff --git a/scripts/restore b/scripts/restore index 21a2115..3d340da 100755 --- a/scripts/restore +++ b/scripts/restore @@ -1,11 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - # Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -13,44 +7,41 @@ source /usr/share/yunohost/helpers #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring the app main directory..." --weight=3 +ynh_script_progression "Restoring the app main directory..." -ynh_restore_file --origin_path="$install_dir" +ynh_restore "$install_dir" -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" - -chmod 660 "$install_dir/config.xml.php" -chown $app:$app "$install_dir/config.xml.php" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 660 "$install_dir/config.xml.php" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app:$app "$install_dir/config.xml.php" #================================================= # RESTORE THE MYSQL DATABASE #================================================= -ynh_script_progression --message="Restoring the MySQL database..." --weight=1 +ynh_script_progression "Restoring the MySQL database..." -ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql +ynh_mysql_db_shell < ./db.sql #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=2 +ynh_script_progression "Restoring the PHP-FPM configuration..." -ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" +ynh_restore "/etc/php/$php_version/fpm/pool.d/$app.conf" -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# GENERIC FINALIZATION #================================================= # RELOAD NGINX AND PHP-FPM #================================================= -ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=1 +ynh_script_progression "Reloading NGINX web server and PHP-FPM..." -ynh_systemd_action --service_name=php$phpversion-fpm --action=reload -ynh_systemd_action --service_name=nginx --action=reload +ynh_systemctl --service=php$php_version-fpm --action=reload +ynh_systemctl --service=nginx --action=reload #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for $app" --last +ynh_script_progression "Restoration completed for $app" diff --git a/scripts/upgrade b/scripts/upgrade index dcdb095..b9e58ca 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,60 +1,46 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - -#================================================= -# STANDARD UPGRADE STEPS #================================================= # STOP SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Stopping a systemd service..." --weight=1 +ynh_script_progression "Stopping $app's systemd service..." -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemctl --service=$app --action="stop" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -if [ "$upgrade_type" == "UPGRADE_APP" ] +# FIXME: this is still supported but the recommendation is now to *always* re-setup the app sources wether or not the upstream sources changed +if ynh_app_upstream_version_changed then - ynh_script_progression --message="Upgrading source files..." --weight=1 + ynh_script_progression "Upgrading source files..." # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" --keep="config.xml.php data files templates/*" fi -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" - -chmod 660 "$install_dir/config.xml.php" -chown $app:$app "$install_dir/config.xml.php" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 660 "$install_dir/config.xml.php" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app:$app "$install_dir/config.xml.php" #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 +ynh_script_progression "Upgrading PHP-FPM configuration..." # Create a dedicated PHP-FPM config -ynh_add_fpm_config +ynh_config_add_phpfpm # Create a dedicated NGINX config -ynh_add_nginx_config +ynh_config_add_nginx #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of $app completed" --last +ynh_script_progression "Upgrade of $app completed" diff --git a/sources/extra_files/app/.gitignore b/sources/extra_files/app/.gitignore deleted file mode 100644 index 783a4ae..0000000 --- a/sources/extra_files/app/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -*.sw[op] diff --git a/sources/patches/.gitignore b/sources/patches/.gitignore deleted file mode 100644 index 783a4ae..0000000 --- a/sources/patches/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -*.sw[op] From 2252f3a8d228dba83f7286d756df373975a77653 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 31 Aug 2024 10:22:11 +0200 Subject: [PATCH 3/3] clear --- manifest.toml | 2 +- scripts/backup | 4 ---- scripts/install | 8 -------- scripts/remove | 2 -- scripts/restore | 6 ------ scripts/upgrade | 17 ++--------------- 6 files changed, 3 insertions(+), 36 deletions(-) diff --git a/manifest.toml b/manifest.toml index 2584f91..606e906 100644 --- a/manifest.toml +++ b/manifest.toml @@ -16,7 +16,7 @@ admindoc = "https://sitemagic.org/sites/cms-guide/" code = "https://github.com/Jemt/SitemagicCMS" [integration] -yunohost = ">= 11.2.18" +yunohost = ">= 11.2.29" helpers_version = "2.1" architectures = "all" multi_instance = true diff --git a/scripts/backup b/scripts/backup index 5f6ebae..578b14a 100755 --- a/scripts/backup +++ b/scripts/backup @@ -18,10 +18,6 @@ ynh_backup "$install_dir" ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP THE PHP-FPM CONFIGURATION -#================================================= - ynh_backup "/etc/php/$php_version/fpm/pool.d/$app.conf" #================================================= diff --git a/scripts/install b/scripts/install index 839a5e0..ce55b8b 100755 --- a/scripts/install +++ b/scripts/install @@ -8,20 +8,15 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression "Setting up source files..." -# Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" #================================================= # PHP-FPM CONFIGURATION #================================================= ynh_script_progression "Configuring PHP-FPM..." -# Create a dedicated PHP-FPM config ynh_config_add_phpfpm -# Create a dedicated NGINX config ynh_config_add_nginx #================================================= @@ -31,9 +26,6 @@ ynh_script_progression "Adding $app's configuration..." ynh_config_add --template="config.xml.php" --destination="$install_dir/config.xml.php" -#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 660 "$install_dir/config.xml.php" -#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app:$app "$install_dir/config.xml.php" - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/remove b/scripts/remove index 0201b35..2528648 100755 --- a/scripts/remove +++ b/scripts/remove @@ -8,10 +8,8 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression "Removing NGINX web server configuration..." -# Remove the dedicated NGINX config ynh_config_remove_nginx -# Remove the dedicated PHP-FPM config ynh_config_remove_phpfpm #================================================= diff --git a/scripts/restore b/scripts/restore index 3d340da..9d43d9e 100755 --- a/scripts/restore +++ b/scripts/restore @@ -1,6 +1,5 @@ #!/bin/bash -# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -11,11 +10,6 @@ ynh_script_progression "Restoring the app main directory..." ynh_restore "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" -#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 660 "$install_dir/config.xml.php" -#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app:$app "$install_dir/config.xml.php" - #================================================= # RESTORE THE MYSQL DATABASE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index b9e58ca..4ad6fb1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -13,30 +13,17 @@ ynh_systemctl --service=$app --action="stop" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression "Upgrading source files..." -# FIXME: this is still supported but the recommendation is now to *always* re-setup the app sources wether or not the upstream sources changed -if ynh_app_upstream_version_changed -then - ynh_script_progression "Upgrading source files..." - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep="config.xml.php data files templates/*" -fi - -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" -#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 660 "$install_dir/config.xml.php" -#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app:$app "$install_dir/config.xml.php" +ynh_setup_source --dest_dir="$install_dir" --keep="config.xml.php data files templates/*" #================================================= # PHP-FPM CONFIGURATION #================================================= ynh_script_progression "Upgrading PHP-FPM configuration..." -# Create a dedicated PHP-FPM config ynh_config_add_phpfpm -# Create a dedicated NGINX config ynh_config_add_nginx #=================================================