From 0499aedce8b84c8869370cd77b522cf546f768a3 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Mon, 26 Jul 2010 15:59:37 +0200 Subject: [PATCH] update-stats: Output logging.conf on lighttpd failure. --- usr/local/bin/update-stats | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/usr/local/bin/update-stats b/usr/local/bin/update-stats index 749fed9..7f3fb42 100755 --- a/usr/local/bin/update-stats +++ b/usr/local/bin/update-stats @@ -143,8 +143,12 @@ if lighttpd_conf != f.read(): # Reload lighttpd configuration print "Reloading lighttpd: %s" % reload_lighttpd - subprocess.call(reload_lighttpd, shell=True) - + ret = subprocess.call(reload_lighttpd, shell=True) + + if ret != 0: + print >> sys.stderr, "Reloading lighttpd failed. Logging.conf was:" + print >> sys.stderr, lighttpd_conf + f.close() # Now, run awstats to parse log files. -- 2.30.2