Commit 0ea89467 authored by Jakub Jirutka's avatar Jakub Jirutka

community/py-waitress: fix init to never change owner of e.g. /run

for example when unix_socket_path=/run/app.sock.
parent db7e34bf
......@@ -70,5 +70,5 @@ _py() {
sha512sums="d53cf027525aec6fbd49ab78c30fef1b83d8b58c6d2cbb191d45e69141d7c31d6cd195a0924ad862a4cc42e5d098813712c568f768f51825e96fac3dd4132fbe waitress-1.1.0.tar.gz
92c2e718e3aa3e4f5980208f482b9b0f0b3a3b6e736566635367ecaaecd86cfd98ba064c0b3d0bd33bab1acccfaf5a56557c7a162dbb86a166f277ffb2638a5c waitress.initd
cceddb312049a1ae6141df403ee92e1276a4697a23ef8063b47721f59c508a4ded604802c6f55face5620e7be06e893ef51309ee7d8058d81858f86b2fc94cbe waitress.confd"
e3dc21abf42d9e867b129004039d901df5e86f696ff3821f9b2efdf22966b64686ecff6c0fac8101ba011b007fc1358d9dab236ab69208d06a477bb29b8d7d15 waitress.initd
15c571e6b21cfa36273e7c3f659f70d15c702c747f9ba8c681e448f52260561b87f04607a78d98f173a6068baacdc399d4593f6d7fdabb98e31578303c1b6fdb waitress.confd"
......@@ -29,8 +29,10 @@ wsgi_module="wsgi"
# Example: listen=" [::1]:8080 *:8181"
# Path of Unix socket. If a socket path is specified, a Unix domain socket is
# made instead of the usual inet domain socket.
# Path of unix socket to create and listen on. The directory of the socket path
# will be created if not exists and changed owner to the $user. It must not be
# existing directory owned by root, such as /run. Use e.g. /run/app/server.sock.
# If specified, $listen_on is effectively ignored.
# Octal permissions to use for the Unix domain socket. Default is 600.
......@@ -48,6 +48,10 @@ start_pre() {
if [ -n "$unix_socket_path" ]; then
if [ "$(stat -c %u "${unix_socket_path%/*}" 2>/dev/null)" -eq 0 ]; then
eerror "Directory \"${unix_socket_path%/*}\" already exists and is owned by root!"
return 1
checkpath -d -m 0755 -o $user "${unix_socket_path%/*}"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment