From 11f5b17c55654c838a2aa1ad5842224b541a2424 Mon Sep 17 00:00:00 2001 From: Niko Tyni Date: Wed, 25 Oct 2006 20:11:16 +0000 Subject: r377@rebekka: niko | 2006-10-25 23:12:34 +0300 don't die at startup if syslogd is missing, just warn. --- lib/Smokeping.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm index 3f76a7e..2588a04 100644 --- a/lib/Smokeping.pm +++ b/lib/Smokeping.pm @@ -2708,7 +2708,10 @@ sub daemonize_me ($) { eval { syslog($syslog_priority, 'Starting syslog logging'); }; - die("can't log to syslog: $@") if $@; + if ($@) { + print "Warning: can't connect to syslog. Messages will be lost.\n"; + print "Error message was: $@"; + } } sub do_syslog ($){ -- cgit v1.2.3-24-g4f1b