From 97423dd22ce1f29802fd3dc09d20d387a32c0a4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 5 Dec 2021 20:54:35 +0100 Subject: [PATCH] Testing (#31) * 4.3 --- README.md | 4 ++-- README_fr.md | 4 ++-- check_process | 8 ++++---- conf/app.src | 5 ++--- manifest.json | 4 ++-- scripts/remove | 11 +++++++++++ scripts/restore | 3 +-- 7 files changed, 24 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index e9b3098..0bf6adc 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Haste is an open-source pastebin software written in node.js, which is easily installable in any network. YunoHost Project uses Haste as pastebin for log sharing: [paste.yunohost.org](https://paste.yunohost.org/) -**Shipped version:** 0.1.0~ynh8 +**Shipped version:** 0.1.0~ynh9 **Demo:** http://hastebin.com/ @@ -45,7 +45,7 @@ The [Haste-client](https://github.com/seejohnrun/haste-client) is a simple clien ## Documentation and resources -* Official app website: https://example.com +* Official app website: http://hastebin.com/ * Official user documentation: https://hastebin.com/about.md * Upstream app code repository: https://github.com/seejohnrun/haste-server * YunoHost documentation for this app: https://yunohost.org/app_haste diff --git a/README_fr.md b/README_fr.md index 6a33daf..bbf79c6 100644 --- a/README_fr.md +++ b/README_fr.md @@ -14,7 +14,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Haste est un logiciel pastebin open-source écrit en node.js, facilement installable sur n'importe quel réseau. Le projet YunoHost utilise Haste comme pastebin pour le partage de log : [paste.yunohost.org](https://paste.yunohost.org/) -**Version incluse :** 0.1.0~ynh8 +**Version incluse :** 0.1.0~ynh9 **Démo :** http://hastebin.com/ @@ -42,7 +42,7 @@ Le [client Haste](https://github.com/seejohnrun/haste-client) est un client simp ## Documentations et ressources -* Site officiel de l'app : https://example.com +* Site officiel de l'app : http://hastebin.com/ * Documentation officielle utilisateur : https://hastebin.com/about.md * Dépôt de code officiel de l'app : https://github.com/seejohnrun/haste-server * Documentation YunoHost pour cette app : https://yunohost.org/app_haste diff --git a/check_process b/check_process index ffc8451..c7e7a34 100644 --- a/check_process +++ b/check_process @@ -1,9 +1,9 @@ ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/" (PATH) - is_public=1 (PUBLIC|public=1|private=0) - port="7777" (PORT) + domain="domain.tld" + path="/" + is_public=1 + port="7777" ; Checks pkg_linter=1 setup_sub_dir=0 diff --git a/conf/app.src b/conf/app.src index 0cee885..2a3fe06 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,6 +1,5 @@ -SOURCE_URL=https://github.com/seejohnrun/haste-server/archive/5d2965ffc5d9b309ef6d4be9e8c2288c83d72c73.tar.gz -SOURCE_SUM=099bf0cec59614f0f6151f0809c8580b85d5fe701892dda96263b8aee743d5d8 +SOURCE_URL=https://github.com/seejohnrun/haste-server/archive/7af15cc32de1c5381e713aa4c1d1e996ef3592be.tar.gz +SOURCE_SUM=0173723915f46a7cfa5bc49e9b90afcfcd7afe855b2e97da3b5c214d7f87ab20 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= diff --git a/manifest.json b/manifest.json index 012d429..20f48da 100644 --- a/manifest.json +++ b/manifest.json @@ -6,11 +6,11 @@ "en": "Open-source pastebin allowing to upload texts", "fr": "Pastebin open-source permettant de mettre en ligne du texte" }, - "version": "0.1.0~ynh8", + "version": "0.1.0~ynh9", "url": "http://hastebin.com/", "upstream": { "license": "MIT", - "website": "https://example.com", + "website": "http://hastebin.com/", "demo": "http://hastebin.com/", "userdoc": "https://hastebin.com/about.md", "code": "https://github.com/seejohnrun/haste-server" diff --git a/scripts/remove b/scripts/remove index e9b14d8..e567844 100755 --- a/scripts/remove +++ b/scripts/remove @@ -78,6 +78,17 @@ ynh_secure_remove --file="/usr/bin/$app" ynh_secure_remove --file="$data_path" +#================================================= +# REMOVE DATA DIR +#================================================= + +# Remove the data directory if --purge option is used +if [ "${YNH_APP_PURGE:-0}" -eq 1 ] +then + ynh_script_progression --message="Removing app data directory..." --weight=1 + ynh_secure_remove --file="$data_path" +fi + #================================================= # REMOVE NODEJS #================================================= diff --git a/scripts/restore b/scripts/restore index 0cb0ac8..234e2c8 100755 --- a/scripts/restore +++ b/scripts/restore @@ -33,8 +33,7 @@ data_path=$(ynh_app_setting_get --app=$app --key=data_path) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=2 -test ! -d $final_path \ - || ynh_die "There is already a directory: $final_path " +test ! -d $final_path || ynh_die "There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS