The DocumentRoot directory is now automatically created if it does not exists. This will prevent the service from working if a user forgets to create the DocumentRoot directory himself and this also makes automated testing easier.

svn path=/nixos/trunk/; revision=22929
This commit is contained in:
Sander van der Burg 2010-08-03 13:48:08 +00:00
parent 02bf0db39e
commit 9a94e561a5

View File

@ -582,6 +582,13 @@ in
mkdir -m 0700 -p ${mainCfg.stateDir}
mkdir -m 0700 -p ${mainCfg.logDir}
${optionalString (mainCfg.documentRoot != null)
''
# Create the document root directory if does not exists yet
mkdir -p ${mainCfg.documentRoot}
''
}
# Get rid of old semaphores. These tend to accumulate across
# server restarts, eventually preventing it from restarting
# succesfully.