diff options
Diffstat (limited to 'main/uwsgi/uwsgi.initd')
-rw-r--r-- | main/uwsgi/uwsgi.initd | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/main/uwsgi/uwsgi.initd b/main/uwsgi/uwsgi.initd index 8502ebba1a..cdef9f0492 100644 --- a/main/uwsgi/uwsgi.initd +++ b/main/uwsgi/uwsgi.initd @@ -2,8 +2,8 @@ # If you want to run multiple separate processes, then create symlinks to # this runscript (e.g. uwsgi.myapp or myapp) and configure options in -# the corresponding conf.d files. uWSGI options can be specified as variables -# prefixed with "uwsgi_" (e.g. uwsgi_chmod_socket=640 -> --chmod-socket=640). +# the corresponding conf.d files. uWSGI options can be specified using +# variable uwsgi_opts or config file specified by variable uwsgi_conf. : ${pidfile:="/run/$RC_SVCNAME/uwsgi.pid"} @@ -12,7 +12,7 @@ description_reload='Gracefully reload all the workers and the master process' description_stats='Dump uWSGI statistics to log file' command='/usr/sbin/uwsgi' -command_args="--die-on-term" +command_args="--die-on-term ${uwsgi_opts:-}" command_background='yes' start_stop_daemon_args='--quiet' retry='INT/30/KILL/5' @@ -37,7 +37,7 @@ start_pre() { : ${user:="root"} else : ${user:="nobody"} - command_args="$command_args --master" + command_args="--master $command_args" fi start_stop_daemon_args="$start_stop_daemon_args --user $user @@ -59,12 +59,6 @@ start_pre() { command_args="$command_args --yaml ${uwsgi_conf%.yml}.yml" fi - # Convert variables "uwsgi_<opt_name>=<value>" into "--<opt-name>=<value>". - local uwsgi_opts="$(set | grep -v '^uwsgi_conf=' \ - | sed -En 's/^uwsgi_([^=]+)=(.*)/--\1=\2 /p' \ - | sed -E ':s; s/^([^=]*)_([^=]*)=(.*)$/\1-\2=\3/; t s;')" - command_args="$command_args $uwsgi_opts" - checkpath -d -m 755 -o $user:$group \ "$(dirname "$pidfile")" "$(dirname "$logfile")" |