- # xxx fixme - this is just to make sure that nothing gets stupidly lost - should use devnull
- crashlog = os.open('/var/log/httpd/sfa_access_log', os.O_RDWR | os.O_APPEND | os.O_CREAT, 0644)
+ # xxx fixme - this is just to make sure that nothing gets stupidly lost -
+ # should use devnull
+ logdir = '/var/log/httpd'
+ # when installed in standalone we might not have httpd installed
+ if not os.path.isdir(logdir):
+ os.mkdir('/var/log/httpd')
+ crashlog = os.open('%s/sfa_access_log' % logdir, os.O_RDWR | os.O_APPEND | os.O_CREAT, 0644)