0

I'm running lighttpd on a Debian Lenny host. My lighttpd version has a bug where it doesn't recreate its compress.cache-dir on startup (I have it set to use /tmp/lighttpdcompress/). As a result, on reboot, lighttpd fails to start. What can I do to have the system recreate this directory before it runs lighty's init script?

Thanks to all! I'm switching to a directory under /var/tmp to sidestep the problem.

3 Answers 3

5

Either modify your startup script to create it if it doesn't exist, or use a directory structure that won't get blasted at reboot time, like /var/tmp.

2
  • David, maybe add that this startup work could be done in /etc/rc.local
    – kbyrd
    Jun 1, 2009 at 3:30
  • 1
    While possible, I disagree from a bit of a philosophical standpoint. Since the directory is necessary for the service to run, the initfile for that service should be responsible for creating it if it doesn't exist. Spreading things around in multiple files is a recipe for forgetting dependencies. Jun 2, 2009 at 1:13
1

/tmp is cleared every reboot. /var/tmp is not.

Use /var/tmp instead, it's the convention

0

I can't up vote or comment at the moment, but I agree with David Mackintosh's answer. Just edit the init script for lighttpd to add "mkdir /tmp/lighttpdcompress' command. I have not looked a the script, but make sure you put the command in just before the execution of the lighttpd daemon statement.

You must log in to answer this question.