Quellcode durchsuchen

ddns-scripts: start via hotplug only if enabled

To be consistent with other services only start via hotplug if enabled.
Now full functionality of /etc/init.d/ddns enable/disable start/stop

Optimization: Include script only if needed

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
Christian Schoenebeck vor 10 Jahren
Ursprung
Commit
f1faf5f2e1
1 geänderte Dateien mit 2 neuen und 3 gelöschten Zeilen
  1. 2
    3
      net/ddns-scripts/files/etc/hotplug.d/iface/25-ddns

+ 2
- 3
net/ddns-scripts/files/etc/hotplug.d/iface/25-ddns Datei anzeigen

@@ -1,9 +1,8 @@
1 1
 #!/bin/sh
2 2
 
3
-. /usr/lib/ddns/dynamic_dns_functions.sh
4
-
5 3
 if [ "$ACTION" = "ifup" ]; then
6
-	start_daemon_for_all_ddns_sections "$INTERFACE"
4
+	. /usr/lib/ddns/dynamic_dns_functions.sh
5
+	/etc/init.d/ddns enabled && start_daemon_for_all_ddns_sections "$INTERFACE"
7 6
 fi
8 7
 
9 8