X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=bin%2Fcheckdns;h=a6fd957b4af0f8b56d05dbfe97ff62b3b65ba8be;hb=3222686d45d19610bbc333b0bfb58f21fe5f9e54;hp=08e57c0823e2ec304c50c283fd3f1707c2ebec7e;hpb=020a4a5ea2be725b155cae3a2cadc9aba3911b9b;p=clearscm.git diff --git a/bin/checkdns b/bin/checkdns index 08e57c0..a6fd957 100755 --- a/bin/checkdns +++ b/bin/checkdns @@ -121,6 +121,9 @@ GetOptions ( 'logpath=s' => \$logpath, ) or Usage 'Invalid parameter'; +# Need to reset $initial_sleep if it GetOptions changed it +$initial_sleep = $sleep; + $SIG {INT} = $SIG {TERM} = \&Shutdown; @@ -137,7 +140,11 @@ $log->msg ( "Started $FindBin::Script $VERSION logging to $logpath/$FindBin::Script.log" ); -$log->msg ("Polling DNS on host $host every $sleep minutes"); +if ($sleep > 1) { + $log->msg ("Polling DNS on host $host every $sleep minutes"); +} else { + $log->msg ("Polling DNS on host $host every minute"); +} # if EnterDaemonMode unless get_debug; @@ -185,9 +192,9 @@ L =begin html
-Display
-Logger
-Utils
+Display
+Logger
+Utils
=end html