Commit 9e08073a authored by Jakub Jirutka's avatar Jakub Jirutka

community/py-waitress: change $user to standard var $command_user

parent 0ea89467
......@@ -70,5 +70,5 @@ _py() {
}
sha512sums="d53cf027525aec6fbd49ab78c30fef1b83d8b58c6d2cbb191d45e69141d7c31d6cd195a0924ad862a4cc42e5d098813712c568f768f51825e96fac3dd4132fbe waitress-1.1.0.tar.gz
e3dc21abf42d9e867b129004039d901df5e86f696ff3821f9b2efdf22966b64686ecff6c0fac8101ba011b007fc1358d9dab236ab69208d06a477bb29b8d7d15 waitress.initd
15c571e6b21cfa36273e7c3f659f70d15c702c747f9ba8c681e448f52260561b87f04607a78d98f173a6068baacdc399d4593f6d7fdabb98e31578303c1b6fdb waitress.confd"
5e85fdaaf564f1a581488cc8d26362775d8623f414c2a1bddcc7e3ac5bdbbb0ef48eda3f1b00d203dee3cc14b271a3324bfade7a16b9b6106dbb2da85a970d37 waitress.initd
3f3fce6347784461c39f4281c371eabeff165dcfc273f1f92a6f50db35a36dd79faef70abf638dbe3f1894f050828cb3be755172cb7b8283bcbf9b0d5b2723da waitress.confd"
......@@ -4,8 +4,8 @@
# Python executable to run waitress-serve with.
#python="/usr/bin/python3"
# User to run the application.
#user="nobody"
# User (and group) to run the application (e.g. app:www-data).
#command_user="nobody"
# Path of the log file to catch stdout/stderr of the process.
logfile="/var/log/$RC_SVCNAME.log"
......
#!/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
......
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