I have set up a Django project to run with uwsgi and nginx and it's all running as expected, except that when I reboot uwsgi will not launch correctly until the /run/ folder is recreated on the fs. /run is mapped to 'tmpfs' so it needs to be recreated at each boot.I have a systemd service file that I created for uwsgi:[Unit]Description=uWSGI ModuleAfter=syslog.target[Service]ExecStart=/usr/bin/uwsgi --ini /etc/uwsgi.iniRestart=alwaysKillSignal=SIGQUITType=notifyStandardError=syslogNotifyAccess=main[Install]WantedBy=multi-user.targetAnd the /etc/uwsgi.ini file looks like this:[uwsgi]uid = uwsgigid = uwsgipidfile = /run/uwsgi/uwsgi.pidstats = /run/uwsgi/stats.socksocket = /run/uwsgi/uwsgi.sockmaster = trueprocesses = 1chdir = /path/to/our/django/appmodule = icscadamax-requests = 100daemonize = /var/log/uwsgi.logWhat is the recommended way for the /run/uwsgi folder to be recreated at each boot?
What's the best way to have uwsgi create a '/run/uwsgi' folder on reboot?
systemd;uwsgi
The way I eventually solved this problem was to use the latest distributions. Fedora 20 and yum install uwsgi built an environment where all of these details were handled automatically for me, while I was previously trying to fudge this onto a Fedora17 system where it wasn't available in the yum repositories.The way Fedora 20 solves this is by having this in its uwsgi service unit: ExecStartPre=/bin/mkdir -p /run/uwsgi ExecStartPre=/bin/chown uwsgi:uwsgi /run/uwsgi