packages: ddclient/ddclient.init - respect daemon value from config, not ha...

glen glen at pld-linux.org
Mon May 3 10:07:53 CEST 2010


Author: glen                         Date: Mon May  3 08:07:53 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- respect daemon value from config, not hardcoded 300 secs

---- Files affected:
packages/ddclient:
   ddclient.init (1.7 -> 1.8) 

---- Diffs:

================================================================
Index: packages/ddclient/ddclient.init
diff -u packages/ddclient/ddclient.init:1.7 packages/ddclient/ddclient.init:1.8
--- packages/ddclient/ddclient.init:1.7	Tue Sep 26 21:07:01 2006
+++ packages/ddclient/ddclient.init	Mon May  3 10:07:48 2010
@@ -30,7 +30,8 @@
 	# Check if the service is already running?
 	if [ ! -f /var/lock/subsys/ddclient ]; then
 		msg_starting "Dynamic DNS Client"
-		daemon /usr/sbin/ddclient -daemon 300
+		interval=$(awk -F= '{gsub(/[ \t]*#.*/, "")} $1 == "daemon" {print $2}' /etc/ddclient/ddclient.conf)
+		daemon /usr/sbin/ddclient -daemon ${interval:-300}
 		RETVAL=$?
 		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/ddclient
 	else
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/ddclient/ddclient.init?r1=1.7&r2=1.8&f=u



More information about the pld-cvs-commit mailing list