Browse Source

Add templates

ericgaspar 4 years ago
parent
commit
3a3c84b90d
7 changed files with 27 additions and 17 deletions
  1. BIN
      doc/.DS_Store
  2. 8 0
      doc/DISCLAIMER.md
  3. 8 0
      doc/DISCLAIMER_fr.md
  4. BIN
      doc/screenshots/dashboard.png
  5. 6 12
      manifest.json
  6. 4 4
      scripts/restore
  7. 1 1
      scripts/upgrade

BIN
doc/.DS_Store


+ 8 - 0
doc/DISCLAIMER.md

@@ -0,0 +1,8 @@
+## Configuration
+
+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*.
+
+## Limitations
+
+* Activate DHCP with Pi-hole needs manual configuration of your router.
+* Pi-Hole can't be updated beyond version 3.3.1, because higher versions use an integrated version of dnsmasq. This would require disabling the version of dnsmasq used by YunoHost.

+ 8 - 0
doc/DISCLAIMER_fr.md

@@ -0,0 +1,8 @@
+## Configuration
+
+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*.
+
+## Limitations
+
+* Activer DHCP avec Pi-hole nécessite une configuration manuelle de votre routeur.
+* Pi-Hole ne peut pas être mis à jour au-delà de la version 3.3.1, car les versions supérieures utilisent une version intégrée de dnsmasq. Ce qui oblige a désactiver la version de dnsmasq utilisée par YunoHost.

BIN
doc/screenshots/dashboard.png


+ 6 - 12
manifest.json

@@ -8,6 +8,12 @@
     },
     "version": "5.3.1~ynh1",
     "url": "https://pi-hole.net/",
+    "upstream": {
+        "license": "EUPL-1.2",
+        "website": "https://pi-hole.net/",
+        "admindoc": "https://docs.pi-hole.net",
+        "code": "https://github.com/pi-hole/pi-hole/"
+    },
     "license": "EUPL-1.2",
     "maintainer": {
         "name": "",
@@ -30,29 +36,17 @@
             {
                 "name": "domain",
                 "type": "domain",
-                "ask": {
-                    "en": "Choose a domain for the admin interface of Pi-hole",
-                    "fr": "Choisissez un domaine pour l'interface admin de Pi-hole"
-                },
                 "example": "domain.org"
             },
             {
                 "name": "path",
                 "type": "path",
-                "ask": {
-                    "en": "Choose a path for the admin interface of Pi-hole",
-                    "fr": "Choisissez un chemin pour l'interface admin de Pi-hole"
-                },
                 "example": "/pihole",
                 "default": "/pihole"
             },
             {
                 "name": "admin",
                 "type": "user",
-                "ask": {
-                    "en": "Choose the Pi-hole administrator (must be an existing YunoHost user)",
-                    "fr": "Administrateur de Pi-hole (doit être un utilisateur YunoHost existant)"
-                },
                 "example": "john"
             },
             {

+ 4 - 4
scripts/restore

@@ -119,7 +119,7 @@ ynh_install_app_dependencies $app_depencencies
 # ADVERTISE SERVICE IN ADMIN PANEL
 #=================================================
 
-yunohost service add pihole-FTL --description "PiHole backend service" --log "/var/log/pihole-FTL.log"
+yunohost service add pihole-FTL --description="PiHole backend service" --log="/var/log/pihole-FTL.log" --needs_exposed_ports=$port
 
 #=================================================
 # RESTORE THE CRON FILE
@@ -162,7 +162,7 @@ then
     ynh_systemd_action --action=stop --service_name=dnsmasq
 
     # Disable the real dnsmasq service
-    ynh_exec_warn_less systemctl disable dnsmasq
+    ynh_exec_warn_less systemctl disable dnsmasq --quiet
 
     # And move the files that make the service available in systemd to really disable it
     mv /lib/systemd/system/dnsmasq.service /lib/systemd/system/.dnsmasq.service.backup_by_pihole
@@ -178,7 +178,7 @@ then
     pihole_local_repo="/etc/.pihole"
     cp -a $pihole_local_repo/advanced/Templates/pihole-FTL.service /etc/init.d/pihole-FTL
     chmod +x /etc/init.d/pihole-FTL
-    ynh_exec_warn_less systemctl enable pihole-FTL
+    ynh_exec_warn_less systemctl enable pihole-FTL --quiet
 
     # Replace the service dnsmasq by pihole-FTL
     # That way, YunoHost can continue to use dnsmasq by actually using pihole-FTL
@@ -257,7 +257,7 @@ ynh_store_file_checksum --file="$setupVars"
 #=================================================
 ynh_script_progression --message="Restarting PiHole-FTL..." --weight=2
 
-ynh_exec_warn_less systemctl enable pihole-FTL
+ynh_exec_warn_less systemctl enable pihole-FTL --quiet
 ynh_systemd_action --action=restart --service_name=pihole-FTL
 
 #=================================================

+ 1 - 1
scripts/upgrade

@@ -305,7 +305,7 @@ else
 
     cp -a $pihole_local_repo/advanced/Templates/pihole-FTL.service /etc/init.d/pihole-FTL
     chmod +x /etc/init.d/pihole-FTL
-    ynh_exec_warn_less systemctl enable pihole-FTL
+    ynh_exec_warn_less systemctl enable pihole-FTL --quiet
 
     # Replace the service dnsmasq by pihole-FTL
     # That way, YunoHost can continue to use dnsmasq by actually using pihole-FTL