Merge "Use systemd-tmpfiles to create /var/run/uwsgi"
This commit is contained in:
commit
f500d6a29d
@ -238,7 +238,13 @@ function write_uwsgi_config {
|
|||||||
# create a home for the sockets; note don't use /tmp -- apache has
|
# create a home for the sockets; note don't use /tmp -- apache has
|
||||||
# a private view of it on some platforms.
|
# a private view of it on some platforms.
|
||||||
local socket_dir='/var/run/uwsgi'
|
local socket_dir='/var/run/uwsgi'
|
||||||
sudo install -d -o $STACK_USER -m 755 $socket_dir
|
|
||||||
|
# /var/run will be empty on ubuntu after reboot, so we can use systemd-temptiles
|
||||||
|
# to automatically create $socket_dir.
|
||||||
|
sudo mkdir -p /etc/tmpfiles.d/
|
||||||
|
echo "d $socket_dir 0755 $STACK_USER root" | sudo tee /etc/tmpfiles.d/uwsgi.conf
|
||||||
|
sudo systemd-tmpfiles --create /etc/tmpfiles.d/uwsgi.conf
|
||||||
|
|
||||||
local socket="$socket_dir/${name}.socket"
|
local socket="$socket_dir/${name}.socket"
|
||||||
|
|
||||||
# always cleanup given that we are using iniset here
|
# always cleanup given that we are using iniset here
|
||||||
|
Loading…
Reference in New Issue
Block a user