diff --git a/README.md b/README.md
index 15934bd..adcca8d 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ It shall NOT be edited by hand.
# myTinyTodo for YunoHost
-[![Integration level](https://dash.yunohost.org/integration/mytinytodo.svg)](https://dash.yunohost.org/appci/app/mytinytodo) ![](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg)
+[![Integration level](https://dash.yunohost.org/integration/mytinytodo.svg)](https://dash.yunohost.org/appci/app/mytinytodo) ![Working status](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg)
[![Install myTinyTodo with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mytinytodo)
*[Lire ce readme en français.](./README_fr.md)*
@@ -31,31 +31,33 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
- tyle for mobiles devices
-**Shipped version:** 1.6.10~ynh1
+**Shipped version:** 1.6.10~ynh2
+
**Demo:** https://www.mytinytodo.net/demo/
## Screenshots
-![](./doc/screenshots/shot-v14b1.png)
+![Screenshot of myTinyTodo](./doc/screenshots/shot-v14b1.png)
## Documentation and resources
-* Official app website: http://www.mytinytodo.net/
-* Official admin documentation: https://www.mytinytodo.net/faq.php
-* Upstream app code repository: https://github.com/maxpozdeev/mytinytodo
-* YunoHost documentation for this app: https://yunohost.org/app_mytinytodo
-* Report a bug: https://github.com/YunoHost-Apps/mytinytodo_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/mytinytodo_ynh/tree/testing).
To try the testing branch, please proceed like that.
-```
+
+``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/mytinytodo_ynh/tree/testing --debug
or
sudo yunohost app upgrade mytinytodo -u https://github.com/YunoHost-Apps/mytinytodo_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 bd62adb..73eb49b 100644
--- a/README_fr.md
+++ b/README_fr.md
@@ -1,10 +1,14 @@
+
+
# myTinyTodo pour YunoHost
-[![Niveau d'intégration](https://dash.yunohost.org/integration/mytinytodo.svg)](https://dash.yunohost.org/appci/app/mytinytodo) ![](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg)
+[![Niveau d'intégration](https://dash.yunohost.org/integration/mytinytodo.svg)](https://dash.yunohost.org/appci/app/mytinytodo) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg)
[![Installer myTinyTodo avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mytinytodo)
*[Read this readme in english.](./README.md)*
-*[Lire ce readme en français.](./README_fr.md)*
> *Ce package vous permet d'installer myTinyTodo 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.*
@@ -27,31 +31,33 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
- tyle for mobiles devices
-**Version incluse :** 1.6.10~ynh1
+**Version incluse :** 1.6.10~ynh2
+
**Démo :** https://www.mytinytodo.net/demo/
## Captures d'écran
-![](./doc/screenshots/shot-v14b1.png)
+![Capture d'écran de myTinyTodo](./doc/screenshots/shot-v14b1.png)
## Documentations et ressources
-* Site officiel de l'app : http://www.mytinytodo.net/
-* Documentation officielle de l'admin : https://www.mytinytodo.net/faq.php
-* Dépôt de code officiel de l'app : https://github.com/maxpozdeev/mytinytodo
-* Documentation YunoHost pour cette app : https://yunohost.org/app_mytinytodo
-* Signaler un bug : https://github.com/YunoHost-Apps/mytinytodo_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/mytinytodo_ynh/tree/testing).
Pour essayer la branche testing, procédez comme suit.
-```
+
+``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/mytinytodo_ynh/tree/testing --debug
ou
sudo yunohost app upgrade mytinytodo -u https://github.com/YunoHost-Apps/mytinytodo_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/manifest.json b/manifest.json
index 331b967..d821a54 100644
--- a/manifest.json
+++ b/manifest.json
@@ -6,14 +6,15 @@
"en": "Open source to-do list script",
"fr": "Gestionnaire de todo list"
},
- "version": "1.6.10~ynh1",
+ "version": "1.6.10~ynh2",
"url": "http://www.mytinytodo.net/",
"upstream": {
"license": "GPL-2.0",
"website": "http://www.mytinytodo.net/",
"demo": "https://www.mytinytodo.net/demo/",
"admindoc": "https://www.mytinytodo.net/faq.php",
- "code": "https://github.com/maxpozdeev/mytinytodo"
+ "code": "https://github.com/maxpozdeev/mytinytodo",
+ "cpe": "cpe:2.3:a:mytinytodo:mytinytodo"
},
"license": "GPL-2.0",
"maintainer": {
@@ -21,7 +22,7 @@
"email": "pierre.levasseur@free.fr"
},
"requirements": {
- "yunohost": ">= 4.3.0"
+ "yunohost": ">= 11.0.9"
},
"multi_instance": false,
"services": [
@@ -30,7 +31,7 @@
"mysql"
],
"arguments": {
- "install" : [
+ "install": [
{
"name": "domain",
"type": "domain"
@@ -45,8 +46,8 @@
"name": "title",
"type": "string",
"ask": {
- "en": "Choose a title for your todo list",
- "fr": "Choisissez le titre pour votre liste de tâches"
+ "en": "Choose a title for your todo list",
+ "fr": "Choisissez le titre pour votre liste de tâches"
},
"default": "myTinyTodo"
},
@@ -55,8 +56,8 @@
"type": "password",
"optional": true,
"ask": {
- "en": "Specify password here to protect your tasks from modification, or leave empty that everyone could read/write todolist",
- "fr": "Spécifiez le mot de passe ici pour protéger vos tâches, ou laissez vide pour que tout le monde puisse lire/écrire votre liste de tâche."
+ "en": "Specify password here to protect your tasks from modification, or leave empty that everyone could read/write todolist",
+ "fr": "Spécifiez le mot de passe ici pour protéger vos tâches, ou laissez vide pour que tout le monde puisse lire/écrire votre liste de tâche."
}
},
{
@@ -66,18 +67,29 @@
"en": "If enabled, myTinyTodo will be accessible by people who do not have an account. This can be changed later via the webadmin.",
"fr": "Si cette case est cochée, myTinyTodo sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin."
},
- "default": true
+ "default": true
},
{
"name": "language",
"type": "string",
"ask": {
- "en": "Choose the application language",
- "fr": "Choisissez la langue de l'application"
+ "en": "Choose the application language",
+ "fr": "Choisissez la langue de l'application"
},
- "choices": ["ar", "de", "en", "fr", "it", "nl", "pt-pt", "ru", "uk", "zh-cn"],
+ "choices": [
+ "ar",
+ "de",
+ "en",
+ "fr",
+ "it",
+ "nl",
+ "pt-pt",
+ "ru",
+ "uk",
+ "zh-cn"
+ ],
"default": "fr"
}
]
}
-}
+}
\ No newline at end of file
diff --git a/scripts/install b/scripts/install
index d03dc9d..7924dda 100644
--- a/scripts/install
+++ b/scripts/install
@@ -95,14 +95,6 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
-#=================================================
-# NGINX CONFIGURATION
-#=================================================
-ynh_script_progression --message="Configuring NGINX web server..." --weight=2
-
-# Create a dedicated NGINX config
-ynh_add_nginx_config
-
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
@@ -111,6 +103,14 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
# Create a dedicated PHP-FPM config
ynh_add_fpm_config
+#=================================================
+# NGINX CONFIGURATION
+#=================================================
+ynh_script_progression --message="Configuring NGINX web server..." --weight=2
+
+# Create a dedicated NGINX config
+ynh_add_nginx_config
+
#=================================================
# MODIFY A CONFIG FILE
#=================================================
diff --git a/scripts/restore b/scripts/restore
index b7b95f9..a9f38ea 100644
--- a/scripts/restore
+++ b/scripts/restore
@@ -28,23 +28,18 @@ path_url=$(ynh_app_setting_get --app=$app --key=path)
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
-phpversion=$YNH_PHP_VERSION
+phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
# CHECK IF THE APP CAN BE RESTORED
#=================================================
ynh_script_progression --message="Validating restoration parameters..." --weight=2
-test ! -d $final_path || ynh_die --message="There is already a directory: $final_path "
+test ! -d $final_path \
+ || ynh_die --message="There is already a directory: $final_path "
#=================================================
# STANDARD RESTORATION STEPS
-#=================================================
-# RESTORE THE NGINX CONFIGURATION
-#=================================================
-
-ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
-
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
@@ -63,11 +58,6 @@ ynh_restore_file --origin_path="$final_path"
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
-
-#=================================================
-# RESTORE USER RIGHTS
-#=================================================
-
chmod 775 $final_path/db/config.php
chmod 775 $final_path/tmp/sessions
@@ -86,8 +76,12 @@ ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=2
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
-# Recreate a dedicated php-fpm config
-ynh_add_fpm_config
+#=================================================
+# 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
diff --git a/scripts/upgrade b/scripts/upgrade
index 4c26f63..edfffff 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -23,7 +23,7 @@ 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)
-phpversion=$YNH_PHP_VERSION
+phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
timezone="$(cat /etc/timezone)"
set_password=$(ynh_app_setting_get --app=$app --key=set_password)
@@ -93,29 +93,14 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=2
- # Remove the app directory securely
- ynh_secure_remove --file="$final_path"
-
# Download, check integrity, uncompress and patch the source from app.src
- ynh_setup_source --dest_dir="$final_path" #--keep="$final_path/db/config.php"
-
- # Remove the tmp directory securely
- #nh_secure_remove --file="$tmpdir"
- ynh_exec_warn_less ynh_add_config --template="../conf/config.php" --destination="$final_path/db/config.php"
+ ynh_setup_source --dest_dir="$final_path" --keep="db/config.php"
fi
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
-#=================================================
-# NGINX CONFIGURATION
-#=================================================
-ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
-
-# Create a dedicated NGINX config
-ynh_add_nginx_config
-
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
@@ -131,6 +116,14 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
# Create a dedicated PHP-FPM config
ynh_add_fpm_config
+#=================================================
+# NGINX CONFIGURATION
+#=================================================
+ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
+
+# Create a dedicated NGINX config
+ynh_add_nginx_config
+
#=================================================
# RESTORE USER RIGHTS
#=================================================