aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-waitress/waitress.initd
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-07-30 12:40:35 +0200
committerJakub Jirutka <jakub@jirutka.cz>2018-07-30 12:45:26 +0200
commit9e08073ab06d8ccd7e1a0fbea2223d2119ae3c55 (patch)
tree58279dd8feae80f9a055cfde6d07cef98b9b1d53 /community/py-waitress/waitress.initd
parent0ea89467e6286a91641e86f26579371ecfda4686 (diff)
downloadaports-9e08073ab06d8ccd7e1a0fbea2223d2119ae3c55.tar.bz2
aports-9e08073ab06d8ccd7e1a0fbea2223d2119ae3c55.tar.xz
community/py-waitress: change $user to standard var $command_user
Diffstat (limited to 'community/py-waitress/waitress.initd')
-rw-r--r--community/py-waitress/waitress.initd10
1 files changed, 5 insertions, 5 deletions
diff --git a/community/py-waitress/waitress.initd b/community/py-waitress/waitress.initd
index 4f99eb7677..0a1865d788 100644
--- a/community/py-waitress/waitress.initd
+++ b/community/py-waitress/waitress.initd
@@ -1,6 +1,7 @@
#!/sbin/openrc-run
-: ${user:="nobody"}
+# Variables $user and $group are deprecated.
+: ${command_user:="${user:-"nobody"}${group:+":$group"}"}
: ${python:="/usr/bin/python3"}
: ${python_opts:="-u"} # this is needed for stdout/stderr redirect to work
: ${wsgi_module:=}
@@ -14,8 +15,7 @@ command_background="yes"
pidfile="/run/$RC_SVCNAME.pid"
start_stop_daemon_args="
--interpreted
- --user $user
- ${group:+--group $group}
+ --user $command_user
${basedir:+--chdir $basedir}
${start_stop_daemon_args:-}"
@@ -44,7 +44,7 @@ start_pre() {
if [ -n "${logfile:-}" ]; then
start_stop_daemon_args="$start_stop_daemon_args
--stdout $logfile --stderr $logfile"
- checkpath -f -m 0644 -o $user "$logfile"
+ checkpath -f -m 0644 -o ${command_user%:*} "$logfile"
fi
if [ -n "$unix_socket_path" ]; then
@@ -52,7 +52,7 @@ start_pre() {
eerror "Directory \"${unix_socket_path%/*}\" already exists and is owned by root!"
return 1
fi
- checkpath -d -m 0755 -o $user "${unix_socket_path%/*}"
+ checkpath -d -m 0755 -o ${command_user%:*} "${unix_socket_path%/*}"
fi
if yesno "$wsgi_call"; then