diff options
Diffstat (limited to 'community/py-waitress/waitress.initd')
-rw-r--r-- | community/py-waitress/waitress.initd | 10 |
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 |