=cut
- if (-f "$FindBin::Bin/shh") {
+ if (-f "$FindBin::Bin/../data/shh") {
+ $msg .= ' [silent shh]';
if ($log) {
- $log->msg("Not speaking because we were asked to be quiet - $msg");
+ $log->msg($msg);
} else {
- verbose "Not speaking because we were asked to be quiet - $msg";
+ verbose $msg;
} # if
return;
# backoff a little and try again.
my $attempts = 0;
my $maxretries = 3;
- my $backoff = 2;
my ($status, @output);
+ # Log message to log file if $log was passed in.
+ $log->msg($msg) if $log;
+
while ($attempts++ < $maxretries) {
($status, @output) = Execute "/usr/local/bin/gt \"$msg\"";
error $errmsg;
} # if
- sleep $backoff++;
+ sleep int rand 10;
} else {
- return; # We said our piece...
+ return;
} # if
} # while