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:
parent
98ea1c8873
commit
f039b6f710
3 changed files with 32 additions and 6 deletions
|
@ -1,21 +1,28 @@
|
||||||
{
|
{
|
||||||
"name": "I Hate Money",
|
"name": "I Hate Money",
|
||||||
"id": "ihatemoney",
|
"id": "ihatemoney",
|
||||||
|
"packaging_format": 1,
|
||||||
"description": {
|
"description": {
|
||||||
"en": "A simple shared budget manager web application",
|
"en": "A simple shared budget manager web application",
|
||||||
"fr": "Une application web de comptes partagés à plusieurs"
|
"fr": "Une application web de comptes partagés à plusieurs"
|
||||||
},
|
},
|
||||||
"licence": "BSD custom beerware",
|
"url": "http://ihatemoney.org/",
|
||||||
"developer": {
|
"license": "free",
|
||||||
|
"maintainer": {
|
||||||
"name": "Jocelyn Delalande",
|
"name": "Jocelyn Delalande",
|
||||||
"email": "jocelyn@crapouillou.net",
|
"email": "jocelyn@crapouillou.net",
|
||||||
"url": "http://jocelyn.delalande.fr"
|
"url": "http://jocelyn.delalande.fr"
|
||||||
},
|
},
|
||||||
"multi_instance": "false",
|
"requirements": {
|
||||||
|
"yunohost": ">= 2.4"
|
||||||
|
},
|
||||||
|
"multi_instance": false,
|
||||||
|
"services": ["nginx", "mysql", "postfix"],
|
||||||
"arguments": {
|
"arguments": {
|
||||||
"install" : [
|
"install" : [
|
||||||
{
|
{
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
|
"type": "domain",
|
||||||
"ask": {
|
"ask": {
|
||||||
"en": "Choose a domain for ihatemoney",
|
"en": "Choose a domain for ihatemoney",
|
||||||
"fr": "Choisir un domaine pour ihatemoney"
|
"fr": "Choisir un domaine pour ihatemoney"
|
||||||
|
@ -24,6 +31,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "path",
|
"name": "path",
|
||||||
|
"type": "path",
|
||||||
"ask": {
|
"ask": {
|
||||||
"en": "Choose a path for ihatemoney",
|
"en": "Choose a path for ihatemoney",
|
||||||
"fr": "Choisir un chemin pour ihatemoney"
|
"fr": "Choisir un chemin pour ihatemoney"
|
||||||
|
@ -33,12 +41,12 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "is_public",
|
"name": "is_public",
|
||||||
|
"type": "boolean",
|
||||||
"ask": {
|
"ask": {
|
||||||
"en": "Is it a public website ? (even if service is public, each project is protected by a password)",
|
"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)"
|
"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": true
|
||||||
"default": "Yes"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 app is public, add url to SSOWat conf as skipped_uris
|
||||||
if [ "$is_public" = "Yes" ];
|
if [[ "$is_public" -ne 0 ]];
|
||||||
then
|
then
|
||||||
sudo yunohost app setting $app unprotected_uris -v "/"
|
sudo yunohost app setting $app unprotected_uris -v "/"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,5 +1,23 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
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
|
# Upgrade code
|
||||||
sudo cp -r ../sources/ /opt/yunohost/ihatemoney/src/
|
sudo cp -r ../sources/ /opt/yunohost/ihatemoney/src/
|
||||||
|
|
Loading…
Reference in a new issue