+sub notify {
+ my $msg = shift;
+ print STDERR $msg;
+ my $notifier = "/usr/local/sbin/notify-messenger";
+ if ( -x $notifier) {
+ $hostname = Sys::Hostname::hostname();
+ open my $pipe,"|$notifier";
+ print $pipe "$hostname: $msg";
+ close $pipe;
+ }
+}