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 Module After=syslog.target [Service] ExecStart=/usr/bin/uwsgi --ini /etc/uwsgi.ini Restart=always KillSignal=SIGQUIT Type=notify StandardError=syslog NotifyAccess=main [Install] WantedBy=multi-user.target
/etc/uwsgi.ini file looks like this:
[uwsgi] uid = uwsgi gid = uwsgi pidfile = /run/uwsgi/uwsgi.pid stats = /run/uwsgi/stats.sock socket = /run/uwsgi/uwsgi.sock master = true processes = 1 chdir = /path/to/our/django/app module = icscada max-requests = 100 daemonize = /var/log/uwsgi.log
What is the recommended way for the
/run/uwsgi folder to be recreated at each boot?