diff --git a/net/uwsgi-cgi/Makefile b/net/uwsgi-cgi/Makefile index 72f2ef720..e307184d6 100644 --- a/net/uwsgi-cgi/Makefile +++ b/net/uwsgi-cgi/Makefile @@ -51,12 +51,18 @@ endef define Package/uwsgi-cgi/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/uwsgi $(1)/usr/sbin/ + + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/uwsgi.init $(1)/etc/init.d/uwsgi + + $(INSTALL_DIR) $(1)/etc/uwsgi + $(INSTALL_DATA) ./files/emperor.ini $(1)/etc/uwsgi/emperor.ini + + $(INSTALL_DIR) $(1)/etc/uwsgi/vassals endef define Package/uwsgi-cgi-luci-support/install - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files-luci-support/uwsgi.init $(1)/etc/init.d/uwsgi - $(INSTALL_BIN) ./files-luci-support/uwsgi.conf $(1)/etc/uwsgi.conf + endef $(eval $(call BuildPackage,uwsgi-cgi)) diff --git a/net/uwsgi-cgi/files-luci-support/uwsgi.conf b/net/uwsgi-cgi/files-luci-support/uwsgi.conf deleted file mode 100644 index cf48a42bb..000000000 --- a/net/uwsgi-cgi/files-luci-support/uwsgi.conf +++ /dev/null @@ -1,27 +0,0 @@ -[uwsgi] -strict = true -socket = /var/run/uwsgi.sock -cgi-mode = true -cgi = /www/ -chdir = /usr/lib/lua/luci/ -master = true -buffer-size = 10000 -reload-mercy = 8 -max-requests = 2000 -limit-as = 200 -reload-on-as = 256 -reload-on-rss = 192 -no-orphans = true -vacuum = true -enable-threads = true -post-buffering = 8192 -socket-timeout = 120 -thunder-lock = true -logger = syslog:uwsgi -disable-logging = true -log-format = %(addr) %(method) %(uri) => generated %(rsize) bytes in %(msecs) msecs -pidfile = /var/run/uwsgi.pid -die-on-term = true -threads = 3 -processes = 3 -chmod-socket = 666 diff --git a/net/uwsgi-cgi/files/emperor.ini b/net/uwsgi-cgi/files/emperor.ini new file mode 100644 index 000000000..5baa11bf2 --- /dev/null +++ b/net/uwsgi-cgi/files/emperor.ini @@ -0,0 +1,10 @@ +[uwsgi] +strict = true +pidfile = /var/run/uwsgi.pid +emperor = /etc/uwsgi/vassals/*.ini +logger = syslog:uwsgi-emperor +vacuum = true +emperor-on-demand-directory = /var/run/ +emperor-required-heartbeat = 99 +vassal-set = die-on-idle=true +#disable-logging = true \ No newline at end of file diff --git a/net/uwsgi-cgi/files-luci-support/uwsgi.init b/net/uwsgi-cgi/files/uwsgi.init similarity index 53% rename from net/uwsgi-cgi/files-luci-support/uwsgi.init rename to net/uwsgi-cgi/files/uwsgi.init index af2a307e9..98f2c839c 100644 --- a/net/uwsgi-cgi/files-luci-support/uwsgi.init +++ b/net/uwsgi-cgi/files/uwsgi.init @@ -5,9 +5,9 @@ USE_PROCD=1 start_service() { procd_open_instance - procd_set_param command /usr/sbin/uwsgi --ini /etc/uwsgi.conf - procd_set_param file /etc/uwsgi.conf + procd_set_param command /usr/sbin/uwsgi --ini /etc/uwsgi/emperor.ini + procd_set_param file /etc/uwsgi/emperor.ini procd_set_param respawn procd_close_instance - } +}