Skip to content

Commit f500d6a

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Use systemd-tmpfiles to create /var/run/uwsgi"
2 parents f4b4a79 + d0db62a commit f500d6a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

lib/apache

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,13 @@ function write_uwsgi_config {
238238
# create a home for the sockets; note don't use /tmp -- apache has
239239
# a private view of it on some platforms.
240240
local socket_dir='/var/run/uwsgi'
241-
sudo install -d -o $STACK_USER -m 755 $socket_dir
241+
242+
# /var/run will be empty on ubuntu after reboot, so we can use systemd-temptiles
243+
# to automatically create $socket_dir.
244+
sudo mkdir -p /etc/tmpfiles.d/
245+
echo "d $socket_dir 0755 $STACK_USER root" | sudo tee /etc/tmpfiles.d/uwsgi.conf
246+
sudo systemd-tmpfiles --create /etc/tmpfiles.d/uwsgi.conf
247+
242248
local socket="$socket_dir/${name}.socket"
243249

244250
# always cleanup given that we are using iniset here

0 commit comments

Comments
 (0)