update-stats: Output logging.conf on lighttpd failure.
authorMatthijs Kooijman <matthijs@stdin.nl>
Mon, 26 Jul 2010 13:59:37 +0000 (15:59 +0200)
committerMatthijs Kooijman <matthijs@stdin.nl>
Mon, 26 Jul 2010 13:59:37 +0000 (15:59 +0200)
usr/local/bin/update-stats

index 749fed9b11d2ef23f7b11417dac8de498d65328a..7f3fb42429f941c3663e5afd293930894ed79d1f 100755 (executable)
@@ -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.