start via hotplug only if enabled
authorChristian Schoenebeck <christian.schoenebeck@gmail.com>
Tue, 16 Sep 2014 03:23:55 +0000 (05:23 +0200)
committerChristian Schoenebeck <christian.schoenebeck@gmail.com>
Tue, 16 Sep 2014 03:23:55 +0000 (05:23 +0200)
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

net/ddns-scripts/files/etc/hotplug.d/iface/25-ddns

index 4495b5d85464d074005b918ee33757483aadcfd2..f337a674ee715e456b201b6c6108acc634924628 100644 (file)
@@ -1,9 +1,7 @@
 #!/bin/sh
 
-. /usr/lib/ddns/dynamic_dns_functions.sh
-
 if [ "$ACTION" = "ifup" ]; then
-       start_daemon_for_all_ddns_sections "$INTERFACE"
+       . /usr/lib/ddns/dynamic_dns_functions.sh
+       /etc/init.d/ddns enabled && start_daemon_for_all_ddns_sections "$INTERFACE"
 fi
 
-