From 215d14c10dd4222c949f18195610293235e217eb Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 6 Apr 2022 13:23:20 +0000 Subject: [PATCH 1/8] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 683a19d..c924550 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ The application is designed to be flexible enough so that it can handle any ente - Translated user interface. -**Shipped version:** 1.4.2~ynh2 +**Shipped version:** 1.4.3~ynh1 **Demo:** https://demo.easyappointments.org/ diff --git a/README_fr.md b/README_fr.md index 0bd75ec..c99b8c1 100644 --- a/README_fr.md +++ b/README_fr.md @@ -25,7 +25,7 @@ The application is designed to be flexible enough so that it can handle any ente - Translated user interface. -**Version incluse :** 1.4.2~ynh2 +**Version incluse :** 1.4.3~ynh1 **Démo :** https://demo.easyappointments.org/ From fbbda31267a730acbbd378159fffaa9ff356f087 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 6 Apr 2022 15:26:25 +0200 Subject: [PATCH 2/8] Update config.php --- conf/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/config.php b/conf/config.php index db79203..dc1a2ae 100644 --- a/conf/config.php +++ b/conf/config.php @@ -40,7 +40,7 @@ class Config { const DB_HOST = 'localhost'; const DB_NAME = '__DB_NAME__'; - const DB_USERNAME = '__DB_NAME__'; + const DB_USERNAME = '__DB_USER__'; const DB_PASSWORD = '__DB_PWD__'; // ------------------------------------------------------------------------ From edfb123392f72dfa796017147364b26224a805c3 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 6 Apr 2022 15:28:21 +0200 Subject: [PATCH 3/8] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index e5dfc77..1a7a4b6 100644 --- a/manifest.json +++ b/manifest.json @@ -12,7 +12,7 @@ "license": "GPL-3.0-only", "website": "https://easyappointments.org/", "demo": "https://demo.easyappointments.org/", - "admindoc": "https://easyappointments.org/docs.html#1.4.1/readme.md", + "admindoc": "https://easyappointments.org/docs.html#1.4.3/readme.md", "code": "https://github.com/alextselegidis/easyappointments" }, "license": "GPL-3.0-only", From 28e2bbce2dd896fa2755ead95c4cc86d38fba46c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 6 Apr 2022 13:28:27 +0000 Subject: [PATCH 4/8] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c924550..b445861 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ The application is designed to be flexible enough so that it can handle any ente ## Documentation and resources * Official app website: https://easyappointments.org/ -* Official admin documentation: https://easyappointments.org/docs.html#1.4.1/readme.md +* Official admin documentation: https://easyappointments.org/docs.html#1.4.3/readme.md * Upstream app code repository: https://github.com/alextselegidis/easyappointments * YunoHost documentation for this app: https://yunohost.org/app_easyappointments * Report a bug: https://github.com/YunoHost-Apps/easyappointments_ynh/issues diff --git a/README_fr.md b/README_fr.md index c99b8c1..d010e81 100644 --- a/README_fr.md +++ b/README_fr.md @@ -36,7 +36,7 @@ The application is designed to be flexible enough so that it can handle any ente ## Documentations et ressources * Site officiel de l'app : https://easyappointments.org/ -* Documentation officielle de l'admin : https://easyappointments.org/docs.html#1.4.1/readme.md +* Documentation officielle de l'admin : https://easyappointments.org/docs.html#1.4.3/readme.md * Dépôt de code officiel de l'app : https://github.com/alextselegidis/easyappointments * Documentation YunoHost pour cette app : https://yunohost.org/app_easyappointments * Signaler un bug : https://github.com/YunoHost-Apps/easyappointments_ynh/issues From 7ddad9ba3e56f307a189c5d5fc9b149809489bc6 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 6 Apr 2022 15:39:14 +0200 Subject: [PATCH 5/8] Update _common.sh --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 3c42172..83180c7 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,6 +4,6 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="7.3" +YNH_PHP_VERSION="8.0" pkg_dependencies="php${YNH_PHP_VERSION}-curl" From fdce7c7e143cc7e56c3fb920fce77c62b959eb4a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 6 Apr 2022 18:54:18 +0200 Subject: [PATCH 6/8] Fix --- manifest.json | 2 +- scripts/_common.sh | 2 +- scripts/change_url | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 1a7a4b6..39f3bd4 100644 --- a/manifest.json +++ b/manifest.json @@ -26,7 +26,7 @@ "multi_instance": true, "services": [ "nginx", - "php7.3-fpm", + "php7.4-fpm", "mysql" ], "arguments": { diff --git a/scripts/_common.sh b/scripts/_common.sh index 83180c7..fa2c050 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,6 +4,6 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="8.0" +YNH_PHP_VERSION="7.4" pkg_dependencies="php${YNH_PHP_VERSION}-curl" diff --git a/scripts/change_url b/scripts/change_url index 004c85c..b5ac3a4 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -28,6 +28,7 @@ ynh_script_progression --message="Loading installation settings..." --weight=1 final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) +db_user=$db_name db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) language=$(ynh_app_setting_get --app=$app --key=language) From 822323cadad3ebda49e5249aef7cdba477f15b80 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 1 Jun 2022 04:16:19 +0200 Subject: [PATCH 7/8] Apply last example_ynh --- check_process | 12 ++---- conf/nginx.conf | 8 ++-- manifest.json | 92 +++++++++++++++++++++++----------------------- scripts/_common.sh | 14 ++++++- scripts/change_url | 9 ++++- scripts/install | 10 ++--- scripts/remove | 16 ++++---- scripts/restore | 6 +-- scripts/upgrade | 10 ++--- 9 files changed, 95 insertions(+), 82 deletions(-) diff --git a/check_process b/check_process index 25f5a00..698cc84 100644 --- a/check_process +++ b/check_process @@ -1,10 +1,8 @@ ;; Test complet ; Manifest domain="domain.tld" - path="/path" - admin="john" - language="english" is_public=1 + language="english" ; Checks pkg_linter=1 setup_sub_dir=0 @@ -13,14 +11,12 @@ setup_private=1 setup_public=1 upgrade=1 - #upgrade=1 from_commit=CommitHash + # 1.4.3~ynh1 + upgrade=1 from_commit=e7afe099868faab80c14135cc4a11c1a82128f81 backup_restore=1 multi_instance=1 + port_already_use=0 change_url=1 ;;; Options Email= Notification=none -;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. - manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1& diff --git a/conf/nginx.conf b/conf/nginx.conf index 65cd5ac..549b52a 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,10 +1,12 @@ -location / { +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; +location __PATH__/ { # Path to source - alias __FINALPATH__/; + alias __FINALPATH__/ ; - index index.php index.html; + index index.php; + # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file #client_max_body_size 50M; try_files $uri $uri/ index.php; diff --git a/manifest.json b/manifest.json index 39f3bd4..a3a9a08 100644 --- a/manifest.json +++ b/manifest.json @@ -1,55 +1,55 @@ { - "name": "Easy!Appointments", - "id": "easyappointments", - "packaging_format": 1, - "description": { - "en": "Open Source Appointment Scheduler", - "fr": "Planificateur de rendez-vous Open Source" - }, - "version": "1.4.3~ynh1", - "url": "https://easyappointments.org/", - "upstream": { + "name": "Easy!Appointments", + "id": "easyappointments", + "packaging_format": 1, + "description": { + "en": "Open Source Appointment Scheduler", + "fr": "Planificateur de rendez-vous Open Source" + }, + "version": "1.4.3~ynh1", + "url": "https://easyappointments.org/", + "upstream": { "license": "GPL-3.0-only", "website": "https://easyappointments.org/", "demo": "https://demo.easyappointments.org/", "admindoc": "https://easyappointments.org/docs.html#1.4.3/readme.md", "code": "https://github.com/alextselegidis/easyappointments" - }, - "license": "GPL-3.0-only", - "maintainer": { - "name": "eric_G", - "email": "" - }, - "requirements": { - "yunohost": ">= 4.3.0" - }, - "multi_instance": true, - "services": [ - "nginx", - "php7.4-fpm", - "mysql" - ], - "arguments": { - "install" : [ - { - "name": "domain", - "type": "domain" }, - { - "name": "is_public", - "type": "boolean", - "default": true + "license": "GPL-3.0-only", + "maintainer": { + "name": "eric_G", + "email": "" }, - { - "name": "language", - "type": "string", - "ask": { - "en": "Choose the application language", - "fr": "Choisissez la langue de l'application" - }, - "choices": ["french", "english"], - "default": "english" - } - ] - } + "requirements": { + "yunohost": ">= 4.3.0" + }, + "multi_instance": true, + "services": [ + "nginx", + "php7.4-fpm", + "mysql" + ], + "arguments": { + "install": [ + { + "name": "domain", + "type": "domain" + }, + { + "name": "is_public", + "type": "boolean", + "default": true + }, + { + "name": "language", + "type": "string", + "ask": { + "en": "Choose the application language", + "fr": "Choisissez la langue de l'application" + }, + "choices": ["french", "english"], + "default": "english" + } + ] + } } diff --git a/scripts/_common.sh b/scripts/_common.sh index fa2c050..e547d1f 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,6 +4,18 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="7.4" +YNH_PHP_VERSION="7.3" pkg_dependencies="php${YNH_PHP_VERSION}-curl" + +#================================================= +# PERSONAL HELPERS +#================================================= + +#================================================= +# EXPERIMENTAL HELPERS +#================================================= + +#================================================= +# FUTURE OFFICIAL HELPERS +#================================================= diff --git a/scripts/change_url b/scripts/change_url index b5ac3a4..7efe8ba 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -26,14 +26,17 @@ app=$YNH_APP_INSTANCE_NAME #================================================= ynh_script_progression --message="Loading installation settings..." --weight=1 +# Needed for helper "ynh_add_nginx_config" final_path=$(ynh_app_setting_get --app=$app --key=final_path) + +# Add settings here as needed by your application db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) language=$(ynh_app_setting_get --app=$app --key=language) #================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP #================================================= ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 @@ -99,7 +102,9 @@ fi #================================================= # SPECIFIC MODIFICATIONS #================================================= -ynh_script_progression --message="Configuring $app..." --weight=1 +# UPDATE A CONFIG FILE +#================================================= +ynh_script_progression --message="Updating a configuration file..." --weight=1 domain=$new_domain diff --git a/scripts/install b/scripts/install index 206047f..7b8b461 100644 --- a/scripts/install +++ b/scripts/install @@ -22,9 +22,8 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url="/" -language=$YNH_APP_ARG_LANGUAGE is_public=$YNH_APP_ARG_IS_PUBLIC -phpversion=$YNH_PHP_VERSION +language=$YNH_APP_ARG_LANGUAGE app=$YNH_APP_INSTANCE_NAME @@ -47,8 +46,9 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=language --value=$language -ynh_app_setting_set --app=$app --key=phpversion --value=$phpversion +#================================================= +# STANDARD MODIFICATIONS #================================================= # INSTALL DEPENDENCIES #================================================= @@ -56,15 +56,13 @@ ynh_script_progression --message="Installing dependencies..." --weight=1 ynh_install_app_dependencies $pkg_dependencies -#================================================= -# STANDARD MODIFICATIONS #================================================= # CREATE DEDICATED USER #================================================= ynh_script_progression --message="Configuring system user..." --weight=2 # Create a system user -ynh_system_user_create --username=$app --home_dir=$final_path +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # CREATE A MYSQL DATABASE diff --git a/scripts/remove b/scripts/remove index c823f3c..96f528d 100644 --- a/scripts/remove +++ b/scripts/remove @@ -37,14 +37,6 @@ ynh_script_progression --message="Removing the MySQL database..." --weight=4 # Remove a database if it exists, along with the associated user ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." --weight=1 - -# Remove metapackage and its dependencies -ynh_remove_app_dependencies - #================================================= # REMOVE APP MAIN DIR #================================================= @@ -69,6 +61,14 @@ ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=3 # Remove the dedicated PHP-FPM config ynh_remove_fpm_config +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." --weight=1 + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/restore b/scripts/restore index 6a66933..31710f5 100644 --- a/scripts/restore +++ b/scripts/restore @@ -20,7 +20,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading settings..." --weight=1 +ynh_script_progression --message="Loading installation settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME @@ -44,7 +44,7 @@ test ! -d $final_path \ #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the NGINX configuration..." +ynh_script_progression --message="Restoring the NGINX web server configuration..." ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" @@ -54,7 +54,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_script_progression --message="Recreating the dedicated system user..." --weight=3 # Create the dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir=$final_path +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # RESTORE THE APP MAIN DIR diff --git a/scripts/upgrade b/scripts/upgrade index 622f849..d94b664 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -27,18 +27,19 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CHECK VERSION #================================================= +ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up $app before upgrading (may take a while)..." --weight=7 +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=7 # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { - # restore it if the upgrade fails + # Restore it if the upgrade fails ynh_restore_upgradebackup } # Exit if an error occurs during the execution of the script @@ -67,19 +68,18 @@ fi ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 # Create a dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir=$final_path +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= 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="$final_path" --keep="$final_path/config.php" + ynh_setup_source --dest_dir="$final_path" --keep="config.php storage/" fi chmod 750 "$final_path" From 157751496daf17a1c76bfff039bfa089694baefb Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 1 Jun 2022 02:16:25 +0000 Subject: [PATCH 8/8] Auto-update README --- README.md | 19 ++++++++++--------- README_fr.md | 25 +++++++++++++++---------- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index b445861..02a4ef2 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Easy!Appointments for YunoHost -[![Integration level](https://dash.yunohost.org/integration/easyappointments.svg)](https://dash.yunohost.org/appci/app/easyappointments) ![](https://ci-apps.yunohost.org/ci/badges/easyappointments.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/easyappointments.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/easyappointments.svg)](https://dash.yunohost.org/appci/app/easyappointments) ![Working status](https://ci-apps.yunohost.org/ci/badges/easyappointments.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/easyappointments.maintain.svg) [![Install Easy!Appointments with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=easyappointments) *[Lire ce readme en français.](./README_fr.md)* @@ -35,25 +35,26 @@ The application is designed to be flexible enough so that it can handle any ente ## Screenshots -![](./doc/screenshots/screenshots.png) +![Screenshot of Easy!Appointments](./doc/screenshots/screenshots.png) ## Documentation and resources -* Official app website: https://easyappointments.org/ -* Official admin documentation: https://easyappointments.org/docs.html#1.4.3/readme.md -* Upstream app code repository: https://github.com/alextselegidis/easyappointments -* YunoHost documentation for this app: https://yunohost.org/app_easyappointments -* Report a bug: https://github.com/YunoHost-Apps/easyappointments_ynh/issues +* Official app website: +* Official admin documentation: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: ## Developer info Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/easyappointments_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/easyappointments_ynh/tree/testing --debug or sudo yunohost app upgrade easyappointments -u https://github.com/YunoHost-Apps/easyappointments_ynh/tree/testing --debug ``` -**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file +**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index d010e81..8bfd370 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,10 +1,14 @@ + + # Easy!Appointments pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/easyappointments.svg)](https://dash.yunohost.org/appci/app/easyappointments) ![](https://ci-apps.yunohost.org/ci/badges/easyappointments.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/easyappointments.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/easyappointments.svg)](https://dash.yunohost.org/appci/app/easyappointments) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/easyappointments.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/easyappointments.maintain.svg) [![Installer Easy!Appointments avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=easyappointments) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer Easy!Appointments rapidement et simplement sur un serveur YunoHost. Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* @@ -31,25 +35,26 @@ The application is designed to be flexible enough so that it can handle any ente ## Captures d'écran -![](./doc/screenshots/screenshots.png) +![Capture d'écran de Easy!Appointments](./doc/screenshots/screenshots.png) ## Documentations et ressources -* Site officiel de l'app : https://easyappointments.org/ -* Documentation officielle de l'admin : https://easyappointments.org/docs.html#1.4.3/readme.md -* Dépôt de code officiel de l'app : https://github.com/alextselegidis/easyappointments -* Documentation YunoHost pour cette app : https://yunohost.org/app_easyappointments -* Signaler un bug : https://github.com/YunoHost-Apps/easyappointments_ynh/issues +* Site officiel de l'app : +* Documentation officielle de l'admin : +* Dépôt de code officiel de l'app : +* Documentation YunoHost pour cette app : +* Signaler un bug : ## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/easyappointments_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/easyappointments_ynh/tree/testing --debug ou sudo yunohost app upgrade easyappointments -u https://github.com/YunoHost-Apps/easyappointments_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file +**Plus d'infos sur le packaging d'applications :**