diff --git a/manifest.json b/manifest.json index 6d495d8..38a568a 100644 --- a/manifest.json +++ b/manifest.json @@ -1,21 +1,28 @@ { "name": "I Hate Money", "id": "ihatemoney", + "packaging_format": 1, "description": { "en": "A simple shared budget manager web application", "fr": "Une application web de comptes partagés à plusieurs" }, - "licence": "BSD custom beerware", - "developer": { + "url": "http://ihatemoney.org/", + "license": "free", + "maintainer": { "name": "Jocelyn Delalande", "email": "jocelyn@crapouillou.net", "url": "http://jocelyn.delalande.fr" }, - "multi_instance": "false", + "requirements": { + "yunohost": ">= 2.4" + }, + "multi_instance": false, + "services": ["nginx", "mysql", "postfix"], "arguments": { "install" : [ { "name": "domain", + "type": "domain", "ask": { "en": "Choose a domain for ihatemoney", "fr": "Choisir un domaine pour ihatemoney" @@ -24,6 +31,7 @@ }, { "name": "path", + "type": "path", "ask": { "en": "Choose a path for ihatemoney", "fr": "Choisir un chemin pour ihatemoney" @@ -33,12 +41,12 @@ }, { "name": "is_public", + "type": "boolean", "ask": { "en": "Is it a public website ? (even if service is public, each project is protected by a password)", "fr": "Le service est-il public ? (même dans ce cas, chaque projet est protégé par un mot de passe)" }, - "choices": ["Yes", "No"], - "default": "Yes" + "default": true } ] } diff --git a/scripts/install b/scripts/install index 9e85c60..e9d4599 100755 --- a/scripts/install +++ b/scripts/install @@ -88,7 +88,7 @@ sudo ln -s /etc/ihatemoney/settings.py /opt/yunohost/ihatemoney/src/budget/setti # If app is public, add url to SSOWat conf as skipped_uris -if [ "$is_public" = "Yes" ]; +if [[ "$is_public" -ne 0 ]]; then sudo yunohost app setting $app unprotected_uris -v "/" fi diff --git a/scripts/upgrade b/scripts/upgrade index 6b390da..be2575a 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,5 +1,23 @@ #!/bin/bash set -e +app=$YNH_APP_INSTANCE_NAME + +# Source YunoHost helpers +. /usr/share/yunohost/helpers + +# Optionaly upgrade arg to typed boolean form + +is_public=$(ynh_app_setting_get "$app" is_public) +if [[ "$is_public" = "" ]]; +then + if [ $public_site = "No" ]; + then + is_public=0 + else + is_public=1 + fi + ynh_app_setting_set "$app" is_public "$is_public" +fi # Upgrade code sudo cp -r ../sources/ /opt/yunohost/ihatemoney/src/