Browse Source

Commits from master

Maniack Crudelis 6 years ago
parent
commit
c364424ca8
4 changed files with 7 additions and 5 deletions
  1. 2 2
      README.md
  2. 2 2
      README_fr.md
  3. 1 1
      hooks/post_domain_add
  4. 2 0
      scripts/restore

+ 2 - 2
README.md

@@ -23,11 +23,11 @@ No demo available.
 
 ## Configuration
 
-Use the admin panel of your Pi-hole to configure this app.
+Use the admin panel of your Pi-hole to configure this app. You may also need to follow the [post-install guide](https://docs.pi-hole.net/main/post-install/) to setup Pi-hole either as a *DNS server* or a *DHCP server*.
 
 ## Documentation
 
-* Official documentation: Not found
+* Official documentation: https://docs.pi-hole.net/
 * Pi-hole as a DHCP server: [dhcp.md](./dhcp.md)
 * YunoHost documentation: There no other documentations, feel free to contribute.
 

+ 2 - 2
README_fr.md

@@ -23,11 +23,11 @@ Aucune démo pour cette application.
 
 ## Configuration
 
-Utiliser le panneau d'administration de votre Pi-hole pour configurer cette application.
+Utiliser le panneau d'administration de votre Pi-hole pour configurer cette application. Vous devrez peut-être aussi suivre le [guide de post-installation] (https://docs.pi-hole.net/main/post-install/) pour configurer Pi-hole en tant que *serveur DNS* ou *serveur DHCP*.
 
 ## Documentation
 
-* Documentation officielle: Impossible à trouver
+* Documentation officielle: https://docs.pi-hole.net/
 * Pi-hole en tant que serveur DHCP: [dhcp.md](./dhcp.md)
 * Documentation YunoHost: Il n'y a pas d'autre documentation, n'hésitez pas à contribuer.
 

+ 1 - 1
hooks/post_domain_add

@@ -3,7 +3,7 @@
 domain=$1
 
 # Trouve l'interface réseau par défaut
-main_iface=$(route | grep default | awk '{print $8;}' | head -n1)
+main_iface=$(route | grep --max-count=1 default | awk '{print $8;}' | head -n1)
 # Trouve l'ipv4 associée à l'interface trouvée
 localipv4=$(ifconfig | grep -A 1 "$main_iface" | tail -1 | awk '{print $2;}' | cut -d: -f2)
 

+ 2 - 0
scripts/restore

@@ -82,6 +82,8 @@ ynh_system_user_create $app
 
 # Restore permissions on app files
 chown $app: -R "/etc/pihole"
+# /etc/pihole/logrotate have to belong to root, otherwise logrotate will failed silently...
+chown root: -R "/etc/pihole/logrotate"
 
 #=================================================
 # RESTORE THE PHP-FPM CONFIGURATION