Browse code

Merge "Create custom dir for uwsgi domain sockets"

Jenkins authored on 2017/04/21 12:29:15
Showing 1 changed files
... ...
@@ -230,7 +230,12 @@ function write_uwsgi_config {
230 230
     local http=$4
231 231
     local name=""
232 232
     name=$(basename $wsgi)
233
-    local socket="/tmp/${name}.socket"
233
+
234
+    # create a home for the sockets; note don't use /tmp -- apache has
235
+    # a private view of it on some platforms.
236
+    local socket_dir='/var/run/uwsgi'
237
+    sudo install -d -o $STACK_USER -m 755 $socket_dir
238
+    local socket="$socket_dir/${name}.socket"
234 239
 
235 240
     # always cleanup given that we are using iniset here
236 241
     rm -rf $file