mirror of
https://github.com/YunoHost-Apps/pihole_ynh.git
synced 2024-09-03 20:05:58 +02:00
Fix
This commit is contained in:
parent
aa9113d02f
commit
d2ab7d3ced
5 changed files with 36 additions and 38 deletions
|
@ -1,8 +1,8 @@
|
||||||
;; Test version last version
|
;; Test version last version
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld" (DOMAIN)
|
domain="domain.tld"
|
||||||
path="/path" (PATH)
|
path="/path"
|
||||||
admin="john" (USER)
|
admin="john"
|
||||||
query_logging=1
|
query_logging=1
|
||||||
enable_dhcp=0
|
enable_dhcp=0
|
||||||
pihole_version="Last available"
|
pihole_version="Last available"
|
||||||
|
@ -26,15 +26,15 @@
|
||||||
upgrade=1
|
upgrade=1
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=0
|
multi_instance=0
|
||||||
port_already_use=1 (4711)
|
port_already_use=1
|
||||||
change_url=1
|
change_url=1
|
||||||
actions=1
|
actions=1
|
||||||
config_panel=1
|
config_panel=1
|
||||||
;; Test version 3
|
;; Test version 3
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld" (DOMAIN)
|
domain="domain.tld"
|
||||||
path="/path" (PATH)
|
path="/path"
|
||||||
admin="john" (USER)
|
admin="john"
|
||||||
query_logging=1
|
query_logging=1
|
||||||
enable_dhcp=0
|
enable_dhcp=0
|
||||||
pihole_version="Last 3.X"
|
pihole_version="Last 3.X"
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
upgrade=1 from_commit=d79ec131b3038ff4695c3317b5d3ee4eda9c8932
|
upgrade=1 from_commit=d79ec131b3038ff4695c3317b5d3ee4eda9c8932
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
actions=1
|
actions=1
|
||||||
;;; Levels
|
|
||||||
Level 5=auto
|
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=
|
Email=
|
||||||
Notification=change
|
Notification=change
|
||||||
|
|
|
@ -8,25 +8,25 @@ name = "PiHole configuration"
|
||||||
name = "Overwriting config files"
|
name = "Overwriting config files"
|
||||||
|
|
||||||
[main.overwrite_files.overwrite_setupvars]
|
[main.overwrite_files.overwrite_setupvars]
|
||||||
ask = "Overwrite the config file setupVars.conf ?"
|
ask = "Overwrite the config file setupVars.conf?"
|
||||||
type = "boolean"
|
type = "boolean"
|
||||||
default = true
|
default = true
|
||||||
help = "If the file is overwritten, a backup will be created."
|
help = "If the file is overwritten, a backup will be created."
|
||||||
|
|
||||||
[main.overwrite_files.overwrite_ftl]
|
[main.overwrite_files.overwrite_ftl]
|
||||||
ask = "Overwrite the config file pihole-FTL.conf ?"
|
ask = "Overwrite the config file pihole-FTL.conf?"
|
||||||
type = "boolean"
|
type = "boolean"
|
||||||
default = true
|
default = true
|
||||||
help = "If the file is overwritten, a backup will be created."
|
help = "If the file is overwritten, a backup will be created."
|
||||||
|
|
||||||
[main.overwrite_files.overwrite_nginx]
|
[main.overwrite_files.overwrite_nginx]
|
||||||
ask = "Overwrite the nginx config file ?"
|
ask = "Overwrite the nginx config file?"
|
||||||
type = "boolean"
|
type = "boolean"
|
||||||
default = true
|
default = true
|
||||||
help = "If the file is overwritten, a backup will be created."
|
help = "If the file is overwritten, a backup will be created."
|
||||||
|
|
||||||
[main.overwrite_files.overwrite_phpfpm]
|
[main.overwrite_files.overwrite_phpfpm]
|
||||||
ask = "Overwrite the php-fpm config file ?"
|
ask = "Overwrite the php-fpm config file?"
|
||||||
type = "boolean"
|
type = "boolean"
|
||||||
default = true
|
default = true
|
||||||
help = "If the file is overwritten, a backup will be created."
|
help = "If the file is overwritten, a backup will be created."
|
||||||
|
@ -36,7 +36,7 @@ name = "PiHole configuration"
|
||||||
name = "Global configuration"
|
name = "Global configuration"
|
||||||
|
|
||||||
[main.global_config.email_type]
|
[main.global_config.email_type]
|
||||||
ask = "Send HTML email to admin ?"
|
ask = "Send HTML email to admin?"
|
||||||
type = "boolean"
|
type = "boolean"
|
||||||
default = true
|
default = true
|
||||||
help = "Allow app scripts to send HTML mails instead of plain text."
|
help = "Allow app scripts to send HTML mails instead of plain text."
|
||||||
|
@ -46,25 +46,25 @@ name = "PiHole configuration"
|
||||||
name = "PHP-FPM configuration"
|
name = "PHP-FPM configuration"
|
||||||
|
|
||||||
[main.php_fpm_config.footprint]
|
[main.php_fpm_config.footprint]
|
||||||
ask = "Memory footprint of the service ?"
|
ask = "Memory footprint of the service?"
|
||||||
choices = ["low", "medium", "high", "specific"]
|
choices = ["low", "medium", "high", "specific"]
|
||||||
default = "low"
|
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."
|
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]
|
[main.php_fpm_config.free_footprint]
|
||||||
ask = "Memory footprint of the service ?"
|
ask = "Memory footprint of the service?"
|
||||||
type = "number"
|
type = "number"
|
||||||
default = "0"
|
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."
|
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]
|
[main.php_fpm_config.usage]
|
||||||
ask = "Expected usage of the service ?"
|
ask = "Expected usage of the service?"
|
||||||
choices = ["low", "medium", "high"]
|
choices = ["low", "medium", "high"]
|
||||||
default = "low"
|
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."
|
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."
|
||||||
|
|
||||||
[main.php_fpm_config.force_max_children]
|
[main.php_fpm_config.force_max_children]
|
||||||
ask = "Force the value of pm.max_children ?"
|
ask = "Force the value of pm.max_children?"
|
||||||
type = "number"
|
type = "number"
|
||||||
default = "0"
|
default = "0"
|
||||||
help = "Do not change this value unless you're sure about what you're doing !<br>pm.max_children is automatically defined by this formula: $max_ram / 2 / $footprint<br>You can force that value, and ignore the formula by changing the value here.<br>To reset to the default value, set to 0."
|
help = "Do not change this value unless you're sure about what you're doing !<br>pm.max_children is automatically defined by this formula: $max_ram / 2 / $footprint<br>You can force that value, and ignore the formula by changing the value here.<br>To reset to the default value, set to 0."
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"id": "pihole",
|
"id": "pihole",
|
||||||
"packaging_format": 1,
|
"packaging_format": 1,
|
||||||
"description": {
|
"description": {
|
||||||
"en": "Network-wide ad blocking via your own DNS server.",
|
"en": "Network-wide ad blocking via your own DNS server",
|
||||||
"fr": "Filtrage publicitaire sur l'ensemble du réseau via votre propre serveur DNS."
|
"fr": "Filtrage publicitaire via votre propre serveur DNS"
|
||||||
},
|
},
|
||||||
"version": "5.3.1~ynh1",
|
"version": "5.3.1~ynh1",
|
||||||
"url": "https://pi-hole.net/",
|
"url": "https://pi-hole.net/",
|
||||||
|
@ -53,8 +53,8 @@
|
||||||
"name": "query_logging",
|
"name": "query_logging",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"ask": {
|
"ask": {
|
||||||
"en": "Do you want to log queries ?",
|
"en": "Do you want to log DNS queries?",
|
||||||
"fr": "Voulez-vous enregistrer les requêtes dns ?"
|
"fr": "Voulez-vous enregistrer les requêtes DNS ?"
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"en": "Keeping this option deactivate will render graphs on the admin page useless. But will respect the privacy of the other users.",
|
"en": "Keeping this option deactivate will render graphs on the admin page useless. But will respect the privacy of the other users.",
|
||||||
|
@ -66,11 +66,11 @@
|
||||||
"name": "enable_dhcp",
|
"name": "enable_dhcp",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"ask": {
|
"ask": {
|
||||||
"en": "Do you want to set Pi-hole as your DHCP server ?",
|
"en": "Do you want to set Pi-Hole as your DHCP server?",
|
||||||
"fr": "Voulez-vous utiliser Pi-hole an tant que serveur DHCP ?"
|
"fr": "Voulez-vous utiliser Pi-Hole an tant que serveur DHCP ?"
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"en": "If you want to do that, <a href=https://github.com/YunoHost-Apps/pihole_ynh/blob/master/dhcp.md target=_blank>you really have to read this before</a> !",
|
"en": "If you want to do that, <a href=https://github.com/YunoHost-Apps/pihole_ynh/blob/master/dhcp.md target=_blank>you really have to read this before</a>!",
|
||||||
"fr": "Si vous voulez faire ça, <a href=https://github.com/YunoHost-Apps/pihole_ynh/blob/master/dhcp.md target=_blank>vous devez vraiment lire cela avant</a> !"
|
"fr": "Si vous voulez faire ça, <a href=https://github.com/YunoHost-Apps/pihole_ynh/blob/master/dhcp.md target=_blank>vous devez vraiment lire cela avant</a> !"
|
||||||
},
|
},
|
||||||
"default": false
|
"default": false
|
||||||
|
@ -79,12 +79,12 @@
|
||||||
"name": "pihole_version",
|
"name": "pihole_version",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"ask": {
|
"ask": {
|
||||||
"en": "Which version of Pi-Hole do you want to install ?",
|
"en": "Which version of Pi-Hole do you want to install?",
|
||||||
"fr": "Quelle version de Pi-Hole voulez-vous installer ?"
|
"fr": "Quelle version de Pi-Hole voulez-vous installer ?"
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"en": "The last 3.X version is the last version available with the Debian version of dnsmasq.",
|
"en": "The last 3.X version is the last version available with the Debian version of dnsmasq. The last available version will replace the Debian version of dnsmasq by FTLDNS.<br>See the readme for more information.",
|
||||||
"fr": "The last available version will replace the Debian version of dnsmasq by FTLDNS.<br>See the readme for more information."
|
"fr": "La dernière version 3.X est la dernière version disponible avec la version Debian de dnsmasq. La dernière version disponible remplacera la version Debian de dnsmasq par FTLDNS.<br>Voir le readme pour plus d'informations."
|
||||||
},
|
},
|
||||||
"choices": ["Last 3.X","Last available"],
|
"choices": ["Last 3.X","Last available"],
|
||||||
"default": "Last 3.X"
|
"default": "Last 3.X"
|
||||||
|
|
|
@ -38,14 +38,14 @@ pihole_version="$(ynh_app_setting_get --app=$app --key=pihole_version)"
|
||||||
#=================================================
|
#=================================================
|
||||||
# ACTIVATE MAINTENANCE MODE
|
# ACTIVATE MAINTENANCE MODE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Activating maintenance mode..." --time --weight=1
|
ynh_script_progression --message="Activating maintenance mode..." --weight=1
|
||||||
|
|
||||||
ynh_maintenance_mode_ON
|
ynh_maintenance_mode_ON
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Making sure dedicated system user exists..." --time --weight=1
|
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
|
||||||
|
|
||||||
# Create a dedicated user (if not existing)
|
# Create a dedicated user (if not existing)
|
||||||
ynh_system_user_create --username=$app
|
ynh_system_user_create --username=$app
|
||||||
|
@ -53,7 +53,7 @@ ynh_system_user_create --username=$app
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Resetting source files..." --time --weight=1
|
ynh_script_progression --message="Resetting source files..." --weight=1
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
pihole_local_repo="/etc/.pihole"
|
pihole_local_repo="/etc/.pihole"
|
||||||
|
@ -78,7 +78,7 @@ chown $app:www-data "$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Resetting nginx web server configuration..." --time --weight=1
|
ynh_script_progression --message="Resetting NGINX web server configuration..." --weight=1
|
||||||
|
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
yunohost app action run $app reset_default_nginx
|
yunohost app action run $app reset_default_nginx
|
||||||
|
@ -86,7 +86,7 @@ yunohost app action run $app reset_default_nginx
|
||||||
#=================================================
|
#=================================================
|
||||||
# PHP-FPM CONFIGURATION
|
# PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Resetting php-fpm configuration..." --time --weight=1
|
ynh_script_progression --message="Resetting PHP-FPM configuration..." --weight=1
|
||||||
|
|
||||||
# Create a dedicated php-fpm config
|
# Create a dedicated php-fpm config
|
||||||
yunohost app action run $app reset_default_phpfpm
|
yunohost app action run $app reset_default_phpfpm
|
||||||
|
@ -94,7 +94,7 @@ yunohost app action run $app reset_default_phpfpm
|
||||||
#=================================================
|
#=================================================
|
||||||
# RECREATE DIRECTORIES
|
# RECREATE DIRECTORIES
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Recreating and populating directories..." --time --weight=1
|
ynh_script_progression --message="Recreating and populating directories..." --weight=1
|
||||||
|
|
||||||
pihole_storage="/etc/pihole"
|
pihole_storage="/etc/pihole"
|
||||||
mkdir -p "$pihole_storage"
|
mkdir -p "$pihole_storage"
|
||||||
|
@ -241,14 +241,14 @@ ynh_systemd_action --action=restart --service_name=pihole-FTL
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reloading nginx web server..." --time --weight=1
|
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name=nginx --action=reload
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DEACTIVE MAINTENANCE MODE
|
# DEACTIVE MAINTENANCE MODE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Disabling maintenance mode..." --time --weight=1
|
ynh_script_progression --message="Disabling maintenance mode..." --weight=1
|
||||||
|
|
||||||
ynh_maintenance_mode_OFF
|
ynh_maintenance_mode_OFF
|
||||||
|
|
||||||
|
@ -256,4 +256,4 @@ ynh_maintenance_mode_OFF
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_script_progression --message="Execution completed" --time --last
|
ynh_script_progression --message="Execution completed" --last
|
||||||
|
|
|
@ -72,7 +72,7 @@ then
|
||||||
# Get the default file and overwrite the current config
|
# Get the default file and overwrite the current config
|
||||||
cp /etc/yunohost/apps/$app/conf/pihole-FTL.conf "$config_file"
|
cp /etc/yunohost/apps/$app/conf/pihole-FTL.conf "$config_file"
|
||||||
|
|
||||||
ynh_script_progression --message="Restarting PiHole..." --weight=2
|
ynh_script_progression --message="Restarting Pi-Hole..." --weight=2
|
||||||
|
|
||||||
# Restart pihole-FTL
|
# Restart pihole-FTL
|
||||||
ynh_systemd_action --action=restart --service_name=pihole-FTL
|
ynh_systemd_action --action=restart --service_name=pihole-FTL
|
||||||
|
|
Loading…
Add table
Reference in a new issue