*** ddclient.orig	2004-11-06 12:48:09.000000000 +0700
--- ddclient	2004-11-06 13:23:53.620687824 +0700
***************
*** 49,54 ****
--- 49,55 ----
  sub T_IF        {'interface'}
  sub T_PROG      {'program name'}
  sub T_IP        {'ip'}
+ sub T_POSTS	{'postscript'};
  
  ## strategies for obtaining an ip address.
  my %builtinweb = (
***************
*** 220,225 ****
--- 221,228 ----
  	'help'                => setv(T_BOOL,  0, 0, 1, 0,                    undef),
  	'test'                => setv(T_BOOL,  0, 0, 1, 0,                    undef),
  	'geturl'              => setv(T_STRING,0, 0, 0, '',                   undef),
+ 
+ 	'postscript'          => setv(T_POSTS, 0, 0, 1, '',                   undef),
      },
      'service-common-defaults'       => {
  	'server'	      => setv(T_FQDNP,  1, 0, 1, 'members.dyndns.org', undef),
***************
*** 486,491 ****
--- 489,510 ----
  exit($result);
  
  ######################################################################
+ ## runpostscript
+ ######################################################################
+ 
+ sub runpostscript {
+ 	my ($ip) = @_;
+ 
+ 	if ( defined $globals{postscript} ) {
+ 		if ( -x $globals{postscript}) {
+ 			system ("$globals{postscript} $ip &");
+ 		} else {
+ 			warning ("Can not execute post script: %s", $globals{postscript}); 
+ 		}
+ 	}
+ } 
+ 
+ ######################################################################
  ## update_nics
  ######################################################################
  sub update_nics {
***************
*** 505,510 ****
--- 524,530 ----
  	if (@hosts) {
              $0 = sprintf("%s - updating %s", $program, join(',', @hosts));
  	    &$update(@hosts);
+ 	    runpostscript($ip);
  	}
      }
      foreach my $h (sort keys %config) {
