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
|
||||
; Manifest
|
||||
domain="domain.tld" (DOMAIN)
|
||||
path="/path" (PATH)
|
||||
admin="john" (USER)
|
||||
domain="domain.tld"
|
||||
path="/path"
|
||||
admin="john"
|
||||
query_logging=1
|
||||
enable_dhcp=0
|
||||
pihole_version="Last available"
|
||||
|
@ -26,15 +26,15 @@
|
|||
upgrade=1
|
||||
backup_restore=1
|
||||
multi_instance=0
|
||||
port_already_use=1 (4711)
|
||||
port_already_use=1
|
||||
change_url=1
|
||||
actions=1
|
||||
config_panel=1
|
||||
;; Test version 3
|
||||
; Manifest
|
||||
domain="domain.tld" (DOMAIN)
|
||||
path="/path" (PATH)
|
||||
admin="john" (USER)
|
||||
domain="domain.tld"
|
||||
path="/path"
|
||||
admin="john"
|
||||
query_logging=1
|
||||
enable_dhcp=0
|
||||
pihole_version="Last 3.X"
|
||||
|
@ -45,8 +45,6 @@
|
|||
upgrade=1 from_commit=d79ec131b3038ff4695c3317b5d3ee4eda9c8932
|
||||
backup_restore=1
|
||||
actions=1
|
||||
;;; Levels
|
||||
Level 5=auto
|
||||
;;; Options
|
||||
Email=
|
||||
Notification=change
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"id": "pihole",
|
||||
"packaging_format": 1,
|
||||
"description": {
|
||||
"en": "Network-wide ad blocking via your own DNS server.",
|
||||
"fr": "Filtrage publicitaire sur l'ensemble du réseau via votre propre serveur DNS."
|
||||
"en": "Network-wide ad blocking via your own DNS server",
|
||||
"fr": "Filtrage publicitaire via votre propre serveur DNS"
|
||||
},
|
||||
"version": "5.3.1~ynh1",
|
||||
"url": "https://pi-hole.net/",
|
||||
|
@ -53,8 +53,8 @@
|
|||
"name": "query_logging",
|
||||
"type": "boolean",
|
||||
"ask": {
|
||||
"en": "Do you want to log queries ?",
|
||||
"fr": "Voulez-vous enregistrer les requêtes dns ?"
|
||||
"en": "Do you want to log DNS queries?",
|
||||
"fr": "Voulez-vous enregistrer les requêtes DNS ?"
|
||||
},
|
||||
"help": {
|
||||
"en": "Keeping this option deactivate will render graphs on the admin page useless. But will respect the privacy of the other users.",
|
||||
|
@ -66,8 +66,8 @@
|
|||
"name": "enable_dhcp",
|
||||
"type": "boolean",
|
||||
"ask": {
|
||||
"en": "Do you want to set Pi-hole as your DHCP server ?",
|
||||
"fr": "Voulez-vous utiliser Pi-hole an tant que serveur DHCP ?"
|
||||
"en": "Do you want to set Pi-Hole as your DHCP server?",
|
||||
"fr": "Voulez-vous utiliser Pi-Hole an tant que serveur DHCP ?"
|
||||
},
|
||||
"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>!",
|
||||
|
@ -83,8 +83,8 @@
|
|||
"fr": "Quelle version de Pi-Hole voulez-vous installer ?"
|
||||
},
|
||||
"help": {
|
||||
"en": "The last 3.X version is the last version available with the Debian version of dnsmasq.",
|
||||
"fr": "The last available version will replace the Debian version of dnsmasq by FTLDNS.<br>See the readme for more information."
|
||||
"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": "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"],
|
||||
"default": "Last 3.X"
|
||||
|
|
|
@ -38,14 +38,14 @@ pihole_version="$(ynh_app_setting_get --app=$app --key=pihole_version)"
|
|||
#=================================================
|
||||
# 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
|
||||
|
||||
#=================================================
|
||||
# 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)
|
||||
ynh_system_user_create --username=$app
|
||||
|
@ -53,7 +53,7 @@ ynh_system_user_create --username=$app
|
|||
#=================================================
|
||||
# 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
|
||||
pihole_local_repo="/etc/.pihole"
|
||||
|
@ -78,7 +78,7 @@ chown $app:www-data "$final_path"
|
|||
#=================================================
|
||||
# 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
|
||||
yunohost app action run $app reset_default_nginx
|
||||
|
@ -86,7 +86,7 @@ yunohost app action run $app reset_default_nginx
|
|||
#=================================================
|
||||
# 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
|
||||
yunohost app action run $app reset_default_phpfpm
|
||||
|
@ -94,7 +94,7 @@ yunohost app action run $app reset_default_phpfpm
|
|||
#=================================================
|
||||
# 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"
|
||||
mkdir -p "$pihole_storage"
|
||||
|
@ -241,14 +241,14 @@ ynh_systemd_action --action=restart --service_name=pihole-FTL
|
|||
#=================================================
|
||||
# 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
|
||||
|
||||
#=================================================
|
||||
# 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
|
||||
|
||||
|
@ -256,4 +256,4 @@ ynh_maintenance_mode_OFF
|
|||
# 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
|
||||
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
|
||||
ynh_systemd_action --action=restart --service_name=pihole-FTL
|
||||
|
|
Loading…
Add table
Reference in a new issue