diff --git a/manifest.json b/manifest.json index 8c690441ad10af9c692c485c038dae4be36e3c56..0440ae80def42894f315fc68b018f5770e2aa4cb 100644 --- a/manifest.json +++ b/manifest.json @@ -12,5 +12,25 @@ "url": "http://worlddomination.be" }, "multi_instance": "false", - "arguments": {} + "arguments": { + "install" : [ + { + "name": "domain", + "ask": { + "en": "Choose a domain for Neutrinet application", + "fr": "Choisissez un domaine pour l'application Neutrinet" + }, + "example": "domain.org" + }, + { + "name": "path", + "ask": { + "en": "Choose a path for Neutrinet application", + "fr": "Choisissez un chemin pour l'application Neutrinet" + }, + "example": "/neutrinet", + "default": "/neutrinet" + } + ] + } } diff --git a/scripts/install b/scripts/install index ff5b5bd965ae08f95baf890600b44505103fe5cb..50f03b77e3e9e6c335cff725a6eeb07edb8fea50 100644 --- a/scripts/install +++ b/scripts/install @@ -1,5 +1,15 @@ set -e +# Retrieve arguments +domain=$1 +path=$2 + +# Check domain/path availability +sudo yunohost app checkurl $domain$path -a neutrinet +if [[ ! $? -eq 0 ]]; then + exit 1 +fi + source ./commons install_renew_cert() {