Browse Source

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 10 years ago
parent
commit
f1faf5f2e1
1 changed files with 2 additions and 3 deletions
  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 View File

@@ -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