From: Matthijs Kooijman Date: Mon, 26 Jul 2010 13:59:37 +0000 (+0200) Subject: update-stats: Output logging.conf on lighttpd failure. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;ds=inline;h=0499aedce8b84c8869370cd77b522cf546f768a3;hp=fdb4133d7709fe90a1c9fa2a93043bd043a44410;p=matthijs%2Fservers%2Fdrsnuggles.git update-stats: Output logging.conf on lighttpd failure. --- 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.