mirror of
https://github.com/YunoHost-Apps/homeassistant_ynh.git
synced 2024-09-03 19:26:16 +02:00
Code cleaning
This commit is contained in:
parent
8e81e71862
commit
a7998fe6fa
6 changed files with 10 additions and 29 deletions
0
doc/.gitkeep
Normal file
0
doc/.gitkeep
Normal file
1
doc/DISCLAIMER.md
Normal file
1
doc/DISCLAIMER.md
Normal file
|
@ -0,0 +1 @@
|
|||
|
0
doc/screenshots/.gitkeep
Normal file
0
doc/screenshots/.gitkeep
Normal file
|
@ -8,13 +8,19 @@
|
|||
},
|
||||
"version": "2021.11.3~ynh1",
|
||||
"url": "https://github.com/home-assistant/home-assistant",
|
||||
"license": "Apache-2.0",
|
||||
"upstream": {
|
||||
"license": "Apache License 2.0",
|
||||
"website": "https://www.home-assistant.io",
|
||||
"demo": "https://demo.home-assistant.io",
|
||||
"admindoc": "https://www.home-assistant.io/docs/"
|
||||
},
|
||||
"license": "Apache License 2.0",
|
||||
"maintainer": {
|
||||
"name": "ewilly",
|
||||
"email": "ewilly@ewilly.fr"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.0.0"
|
||||
"yunohost": ">= 4.1.0"
|
||||
},
|
||||
"multi_instance": false,
|
||||
"services": [
|
||||
|
@ -24,28 +30,11 @@
|
|||
"install": [
|
||||
{
|
||||
"name": "domain",
|
||||
"type": "domain",
|
||||
"ask": {
|
||||
"en": "Choose a domain for Home Assistant",
|
||||
"fr": "Choisissez un domaine pour Home Assistant"
|
||||
},
|
||||
"help": {
|
||||
"en": "Installation in a path is not possible",
|
||||
"fr": "L'installation sous un chemin de domaine n'est pas possible"
|
||||
},
|
||||
"example": "domain.org or homeassistant.domain.org"
|
||||
"type": "domain"
|
||||
},
|
||||
{
|
||||
"name": "is_public",
|
||||
"type": "boolean",
|
||||
"ask": {
|
||||
"en": "Should this application be public?",
|
||||
"fr": "Est-ce que cette application doit être visible publiquement ?"
|
||||
},
|
||||
"help": {
|
||||
"en": "If not public, Smartphone app will not work",
|
||||
"fr": "Dans le cas contraire, l'application sur Smartphone ne fonctionnera pas"
|
||||
},
|
||||
"default": true
|
||||
}
|
||||
]
|
||||
|
|
|
@ -27,7 +27,6 @@ path_url="/"
|
|||
ynh_script_progression --message="Validating recovery parameters..."
|
||||
# check domain/path availability
|
||||
[ ! -d "$final_path" ] || ynh_die --message="This path already contains a folder"
|
||||
ynh_webpath_available --domain="$domain" --path_url="$path_url" || ynh_die "$domain/$path_url is not available, please use an other domain."
|
||||
|
||||
ynh_script_progression --message="Restoring the port and opening it..."
|
||||
# restore port
|
||||
|
|
|
@ -14,14 +14,6 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
domain=$(ynh_app_setting_get --app="$app" --key=domain)
|
||||
port=$(ynh_app_setting_get --app="$app" --key=port)
|
||||
|
||||
# Cleaning legacy permissions
|
||||
ynh_script_progression --message="Cleaning legacy permissions..."
|
||||
is_public=$(ynh_app_setting_get --app="$app" --key=is_public)
|
||||
if [ -n "$is_public" ]; then
|
||||
ynh_app_setting_delete --app="$app" --key=is_public
|
||||
ynh_app_setting_delete --app="$app" --key=unprotected_uris
|
||||
fi
|
||||
|
||||
# definie useful vars
|
||||
final_path="/opt/yunohost/$app"
|
||||
home_path="/home/yunohost.app/$app"
|
||||
|
|
Loading…
Add table
Reference in a new issue