diff --git a/README.md b/README.md index 9cc0d9c..d80c0c4 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview 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 +**Shipped version:** 0.1.0 (7.10.2020) ## Screenshots @@ -23,12 +23,12 @@ Haste is an open-source pastebin software written in node.js, which is easily in ## Configuration -How to configure this app: a plain file with SSH. + * How to configure this app: a plain file with SSH. ## Documentation * Official documentation: https://hastebin.com/about.md - * YunoHost documentation: If specific documentation is needed, feel free to contribute. + * YunoHost documentation: https://yunohost.org/en/app_haste ## YunoHost specific features diff --git a/README_fr.md b/README_fr.md index a2f9108..bbdfd91 100644 --- a/README_fr.md +++ b/README_fr.md @@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install ## Vue d'ensemble 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 +**Version incluse :** 0.1.0 (7.10.2020) ## Captures d'écran @@ -23,12 +23,12 @@ Haste est un logiciel pastebin open-source écrit en node.js, facilement install ## Configuration -Comment configurer cette application: un fichier brut en SSH. + * Comment configurer cette application: un fichier brut en SSH. ## Documentation * Documentation officielle: https://hastebin.com/about.md - * Documentation YunoHost: Si une documentation spécifique est nécessaire, n'hésitez pas à contribuer. + * Documentation YunoHost: https://yunohost.org/fr/app_haste ## Caractéristiques spécifiques YunoHost diff --git a/manifest.json b/manifest.json index bee1aca..2883421 100644 --- a/manifest.json +++ b/manifest.json @@ -6,15 +6,19 @@ "en": "Open-source pastebin allowing to upload texts", "fr": "Pastebin open-source permettant de mettre en ligne du texte" }, - "version": "0.1.0~ynh5", + "version": "0.1.0~ynh6", "url": "https://github.com/seejohnrun/haste-server", "license": "MIT", "maintainer": { "name": "eric_G", "email": "" }, + "previous_maintainers": [{ + "name": "mbugeia", + "email": "maxime.bugeia@gmail.com" + }], "requirements": { - "yunohost": ">= 4.0.0" + "yunohost": ">= 4.1.7" }, "multi_instance": false, "services": [ @@ -25,19 +29,15 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain name for Haste", - "fr": "Choisissez un nom de domaine pour Haste" - }, + "help": { + "en": "Haste can only be installed in a root domain or subdomain", + "fr": "Haste ne peut être installé que dans un domaine racine ou un sous-domaine " + }, "example": "paste.example.com" }, { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public site? (you won't be able to use Haste command easily if not)", - "fr": "Est-ce un site publique ? (si non, vous ne pourrez pas utiliser la commande Haste facilement)" - }, "help": { "en": "If enabled, Haste 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, Haste sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." diff --git a/scripts/install b/scripts/install index 08d6cc8..cb83642 100755 --- a/scripts/install +++ b/scripts/install @@ -43,7 +43,6 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url ynh_script_progression --message="Storing installation settings..." --weight=2 ynh_app_setting_set --app=$app --key=domain --value=$domain -ynh_app_setting_set --app=$app --key=is_public --value=$is_public ynh_app_setting_set --app=$app --key=path_url --value=$path_url #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index aa85cb6..afddbcd 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -17,7 +17,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path_url) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) port=$(ynh_app_setting_get --app=$app --key=port) @@ -32,21 +31,19 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -# Fix is_public as a boolean value -if [ "$is_public" = "Yes" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=1 - is_public=1 -elif [ "$is_public" = "No" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=0 - is_public=0 -fi - # If final_path doesn't exist, create it if [ -z "$final_path" ]; then final_path=/var/www/$app ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #=================================================