1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ihatemoney_ynh.git synced 2024-09-03 19:26:15 +02:00

Fix manifest to comply with ynh 2.4 style

The shift to 2.4 is not finished though ; still TODO :

- backup/restore scripts
- use of the helpers ?
- remove deprecated yunohost commands
This commit is contained in:
Jocelyn Delande 2016-06-18 00:06:53 +02:00
parent 98ea1c8873
commit f039b6f710
3 changed files with 32 additions and 6 deletions

View file

@ -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
}
]
}

View file

@ -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

View file

@ -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/