File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 case $::osfamily {
2323 redhat: {
2424 $app_directory = ' /etc/uwsgi.d'
25+ $pidfile = ' /var/run/uwsgi/uwsgi.pid'
2526 $python_dev = ' python-devel'
27+ $socket = ' /var/run/uwsgi/uwsgi.socket'
2628 }
2729 default: {
2830 $app_directory = ' /etc/uwsgi/apps-enabled'
31+ $pidfile = ' /run/uwsgi/uwsgi.pid'
2932 $python_dev = ' python-dev'
33+ $socket = ' /run/uwsgi/uwsgi.socket'
3034 }
3135 }
3236}
Original file line number Diff line number Diff line change 44# uWSGI main process configuration
55#
66[uwsgi]
7- socket = /run/uwsgi/uwsgi. socket
8- pidfile = /run/uwsgi/uwsgi.pid
7+ socket = <%= @ socket %>
8+ pidfile = <%= @pidfile %>
99emperor = <%= @app_directory %>
1010emperor-tyrant = true
1111master = true
Original file line number Diff line number Diff line change 1919. /etc/rc.d/init.d/functions
2020
2121OPTIONS=" --daemonize --die-on-term --ini <%= @config_file %>"
22+ UWSGIPID=" <%= @pidfile %>"
23+ UWSGISOCKET=" <%= @socket %>"
24+
25+ UWSGIPIDDIR=" ${UWSGIPID%/* } "
26+ UWSGISOCKETDIR=" ${UWSGISOCKET%/* } "
2227
2328[ -f /etc/sysconfig/uwsgi ] && . /etc/sysconfig/uwsgi
2429
30+ if [ ! -d " ${UWSGIPIDDIR} " ]; then
31+ mkdir -p " ${UWSGIPIDDIR} "
32+ [ -n " ${RUNAS} " ] && chown " ${RUNAS} :" " ${UWSGIPIDDIR} "
33+ fi
34+
35+ if [ ! -d " ${UWSGISOCKETDIR} " ]; then
36+ mkdir -p " ${UWSGISOCKETDIR} "
37+ [ -n " ${RUNAS} " ] && chown " ${RUNAS} :" " ${UWSGISOCKETDIR} "
38+ fi
39+
2540RETVAL=0
2641prog=uwsgi
2742lockfile=/var/lock/subsys/$prog
You can’t perform that action at this time.
0 commit comments