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 :**
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"