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>
This commit is contained in:
Christian Schoenebeck 2014-07-27 16:06:24 +02:00
parent e5613b306f
commit f1faf5f2e1

View file

@ -1,9 +1,8 @@
#!/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