mirror of
https://github.com/YunoHost-Apps/pihole_ynh.git
synced 2024-09-03 20:05:58 +02:00
Use toml for actions and config-panel
This commit is contained in:
parent
7299718e45
commit
b1ec989d2a
4 changed files with 81 additions and 74 deletions
22
actions.json
22
actions.json
|
@ -1,22 +0,0 @@
|
||||||
[{
|
|
||||||
"id": "reset_default_setupvars",
|
|
||||||
"name": "Reset the config file and restore a default one.",
|
|
||||||
"command": "/bin/bash scripts/actions/reset_default_config \"setupVars.conf\"",
|
|
||||||
"user": "root",
|
|
||||||
"accepted_return_codes": [0],
|
|
||||||
"description": {
|
|
||||||
"en": "Reset the config file setupVars.conf.",
|
|
||||||
"fr": "Réinitialise le fichier de configuration setupVars.conf."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "reset_default_ftl",
|
|
||||||
"name": "Reset the config file and restore a default one.",
|
|
||||||
"command": "/bin/bash scripts/actions/reset_default_config \"pihole-FTL.conf\"",
|
|
||||||
"user": "root",
|
|
||||||
"accepted_return_codes": [0],
|
|
||||||
"description": {
|
|
||||||
"en": "Reset the config file pihole-FTL.conf.",
|
|
||||||
"fr": "Réinitialise le fichier de configuration pihole-FTL.conf."
|
|
||||||
}
|
|
||||||
}]
|
|
17
actions.toml
Normal file
17
actions.toml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
[reset_default_setupvars]
|
||||||
|
name = "Reset the config file and restore a default one."
|
||||||
|
command = "/bin/bash scripts/actions/reset_default_config \"setupVars.conf\""
|
||||||
|
# user = "root" # optional
|
||||||
|
# cwd = "/" # optional
|
||||||
|
# accepted_return_codes = [0, 1, 2, 3] # optional
|
||||||
|
accepted_return_codes = [0]
|
||||||
|
description = "Reset the config file setupVars.conf."
|
||||||
|
|
||||||
|
[reset_default_ftl]
|
||||||
|
name = "Reset the config file and restore a default one."
|
||||||
|
command = "/bin/bash scripts/actions/reset_default_config \"pihole-FTL.conf\""
|
||||||
|
# user = "root" # optional
|
||||||
|
# cwd = "/" # optional
|
||||||
|
# accepted_return_codes = [0, 1, 2, 3] # optional
|
||||||
|
accepted_return_codes = [0]
|
||||||
|
description = "Reset the config file pihole-FTL.conf."
|
|
@ -1,52 +0,0 @@
|
||||||
{
|
|
||||||
"name": "PiHole configuration panel",
|
|
||||||
"version": "0.1",
|
|
||||||
"panel": [{
|
|
||||||
"name": "PiHole configuration",
|
|
||||||
"id": "main",
|
|
||||||
"sections": [{
|
|
||||||
"name": "Overwriting config files",
|
|
||||||
"id": "overwrite_files",
|
|
||||||
"options": [{
|
|
||||||
"name": "Overwrite the config file setupVars.conf ?",
|
|
||||||
"help": "If the file is overwritten, a backup will be created.",
|
|
||||||
"id": "overwrite_setupvars",
|
|
||||||
"type": "bool",
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Overwrite the config file pihole-FTL.conf ?",
|
|
||||||
"help": "If the file is overwritten, a backup will be created.",
|
|
||||||
"id": "overwrite_ftl",
|
|
||||||
"type": "bool",
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Overwrite the nginx config file ?",
|
|
||||||
"help": "If the file is overwritten, a backup will be created.",
|
|
||||||
"id": "overwrite_nginx",
|
|
||||||
"type": "bool",
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Overwrite the php-fpm config file ?",
|
|
||||||
"help": "If the file is overwritten, a backup will be created.",
|
|
||||||
"id": "overwrite_phpfpm",
|
|
||||||
"type": "bool",
|
|
||||||
"default": true
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Global configuration",
|
|
||||||
"id": "global_config",
|
|
||||||
"options": [{
|
|
||||||
"name": "Send HTML email to admin ?",
|
|
||||||
"help": "Allow app scripts to send HTML mails instead of plain text.",
|
|
||||||
"id": "email_type",
|
|
||||||
"type": "bool",
|
|
||||||
"default": true
|
|
||||||
}]
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
64
config_panel.toml
Normal file
64
config_panel.toml
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
version = "0.1"
|
||||||
|
name = "PiHole configuration panel"
|
||||||
|
|
||||||
|
[main]
|
||||||
|
name = "PiHole configuration"
|
||||||
|
|
||||||
|
[main.overwrite_files]
|
||||||
|
name = "Overwriting config files"
|
||||||
|
|
||||||
|
[main.overwrite_files.overwrite_setupvars]
|
||||||
|
ask = "Overwrite the config file setupVars.conf ?"
|
||||||
|
type = "boolean"
|
||||||
|
default = true
|
||||||
|
help = "If the file is overwritten, a backup will be created."
|
||||||
|
|
||||||
|
[main.overwrite_files.overwrite_ftl]
|
||||||
|
ask = "Overwrite the config file pihole-FTL.conf ?"
|
||||||
|
type = "boolean"
|
||||||
|
default = true
|
||||||
|
help = "If the file is overwritten, a backup will be created."
|
||||||
|
|
||||||
|
[main.overwrite_files.overwrite_nginx]
|
||||||
|
ask = "Overwrite the nginx config file ?"
|
||||||
|
type = "boolean"
|
||||||
|
default = true
|
||||||
|
help = "If the file is overwritten, a backup will be created."
|
||||||
|
|
||||||
|
[main.overwrite_files.overwrite_phpfpm]
|
||||||
|
ask = "Overwrite the php-fpm config file ?"
|
||||||
|
type = "boolean"
|
||||||
|
default = true
|
||||||
|
help = "If the file is overwritten, a backup will be created."
|
||||||
|
|
||||||
|
|
||||||
|
[main.global_config]
|
||||||
|
name = "Global configuration"
|
||||||
|
|
||||||
|
[main.global_config.email_type]
|
||||||
|
ask = "Send HTML email to admin ?"
|
||||||
|
type = "boolean"
|
||||||
|
default = true
|
||||||
|
help = "Allow app scripts to send HTML mails instead of plain text."
|
||||||
|
|
||||||
|
|
||||||
|
[main.php_fpm_config]
|
||||||
|
name = "PHP-FPM configuration"
|
||||||
|
|
||||||
|
[main.php_fpm_config.footprint]
|
||||||
|
ask = "Memory footprint of the service ?"
|
||||||
|
choices = ["low", "medium", "high", "specific"]
|
||||||
|
default = "low"
|
||||||
|
help = "low <= 20Mb per pool. medium between 20Mb and 40Mb per pool. high > 40Mb per pool.<br>Use specific to set a value with the following option."
|
||||||
|
|
||||||
|
[main.php_fpm_config.free_footprint]
|
||||||
|
ask = "Memory footprint of the service ?"
|
||||||
|
type = "number"
|
||||||
|
default = "0"
|
||||||
|
help = "Free field to specify exactly the footprint in Mb if you don't want to use one of the three previous values."
|
||||||
|
|
||||||
|
[main.php_fpm_config.usage]
|
||||||
|
ask = "Expected usage of the service ?"
|
||||||
|
choices = ["low", "medium", "high"]
|
||||||
|
default = "low"
|
||||||
|
help = "low: Personal usage, behind the sso. No RAM footprint when not used, but the impact on the processor can be high if many users are using the service.<br>medium: Low usage, few people or/and publicly accessible. Low RAM footprint, medium processor footprint when used.<br>high: High usage, frequently visited website. High RAM footprint, but lower on processor usage and quickly responding."
|
Loading…
Add table
Reference in a new issue