1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/searx_ynh.git synced 2024-09-03 20:16:30 +02:00

Merge pull request #79 from YunoHost-Apps/patch

Remove is_public var
This commit is contained in:
Éric Gaspar 2021-03-15 19:08:05 +01:00 committed by GitHub
commit 31ff10ef75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 27 deletions

View file

@ -15,7 +15,7 @@
"email": "opi@zeropi.net"
},
"requirements": {
"yunohost": ">= 3.8.1"
"yunohost": ">= 4.1.7"
},
"multi_instance": false,
"services": [
@ -27,32 +27,17 @@
{
"name": "domain",
"type": "domain",
"ask": {
"en": "Choose a domain for Searx",
"fr": "Choisissez un domaine pour Searx",
"de": "Wählen einen Domain-Namen für Searx"
},
"example": "domain.org"
},
{
"name": "path",
"type": "path",
"ask": {
"en": "Choose a path for Searx",
"fr": "Choisissez un chemin pour Searx",
"de": "Wählen einen Pfad für Searx"
},
"example": "/searx",
"default": "/searx"
},
{
"name": "is_public",
"type": "boolean",
"ask": {
"en": "Is it a public Searx site?",
"fr": "Est-ce un site public ?",
"de": "Ist es eine öffentliche Applikation ?"
},
"help": {
"en": "If enabled, Searx will be accessible by people who do not have an account. This can be changed later via the webadmin.",
"fr": "Si cette case est cochée, Searx sera accessible aux personnes nayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin.",

View file

@ -47,7 +47,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=2
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
#=================================================
# STANDARD MODIFICATIONS

View file

@ -18,7 +18,6 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
@ -32,15 +31,6 @@ upgrade_type=$(ynh_check_app_version_changed)
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..."
# Fix is_public as a boolean value
if [ "$is_public" = "Yes" ]; then
ynh_app_setting_set --app=$app --key=is_public --value=1
is_public=1
elif [ "$is_public" = "No" ]; then
ynh_app_setting_set --app=$app --key=is_public --value=0
is_public=0
fi
# If final_path doesn't exist, create it
if [ -z "$final_path" ]; then
final_path=/var/www/$app