diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-07-30 12:40:35 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-07-30 12:45:26 +0200 |
commit | 9e08073ab06d8ccd7e1a0fbea2223d2119ae3c55 (patch) | |
tree | 58279dd8feae80f9a055cfde6d07cef98b9b1d53 /community/py-waitress | |
parent | 0ea89467e6286a91641e86f26579371ecfda4686 (diff) | |
download | aports-9e08073ab06d8ccd7e1a0fbea2223d2119ae3c55.tar.bz2 aports-9e08073ab06d8ccd7e1a0fbea2223d2119ae3c55.tar.xz |
community/py-waitress: change $user to standard var $command_user
Diffstat (limited to 'community/py-waitress')
-rw-r--r-- | community/py-waitress/APKBUILD | 4 | ||||
-rw-r--r-- | community/py-waitress/waitress.confd | 4 | ||||
-rw-r--r-- | community/py-waitress/waitress.initd | 10 |
3 files changed, 9 insertions, 9 deletions
diff --git a/community/py-waitress/APKBUILD b/community/py-waitress/APKBUILD index 39cceba827..ca59e55b22 100644 --- a/community/py-waitress/APKBUILD +++ b/community/py-waitress/APKBUILD @@ -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" diff --git a/community/py-waitress/waitress.confd b/community/py-waitress/waitress.confd index 80e39da880..4484a51238 100644 --- a/community/py-waitress/waitress.confd +++ b/community/py-waitress/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" 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 |