I have an Ubuntu Linux server that is running in a Vagrant virtual environment. I use the server for development of a web service. When the server starts up I have a shell script that needs to run once in order to setup a cache directory structure on the /tmp/
filesystem.
description "setup web cache"
start on startup
script
mkdir -p /tmp/cache/persistent
mkdir -p /tmp/cache/models
mkdir -p /tmp/cache/views
chmod -R 777 /tmp/cache/
end script
When I boot the server I get an error message that show up in /var/log/upstart/webcache.log
:
mkdir: cannot create directory `/tmp/cache': Read-only file system
Apparently startup
is too soon to start on
. The question is, when is /tmp
available for writing and what do I pass to start on
?