Bug 216628 - www/uwsgi: setting a nondefault uwsgi_program prevents rc.d script from restarting/stopping uwsgi
Summary: www/uwsgi: setting a nondefault uwsgi_program prevents rc.d script from resta...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Richard Gallamore
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-30 23:07 UTC by Thomas Steen Rasmussen / Tykling
Modified: 2021-02-10 08:32 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (eugene)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Steen Rasmussen / Tykling 2017-01-30 23:07:37 UTC
The following line in the uwsgi rc.d script is preventing proper rc.d functionalify when specifying a different uwsgi_program in /etc/rc.conf:

    : ${uwsgi_procname="${command}"}

With this line in place the rc script can start uwsgi (and uses the non-default uwsgi program as it should) but it can't find the running instance, so "status" "restart" and "stop" do not work.

This is because rc.subr uses $procname in check_pidfile() and the line above defaults $procname to $command which is hardcoded to /usr/local/bin/uwsgi further down in the rc.d script. So even if uwsgi_program is set to something else, $procname is still set to /usr/local/bin/uwsgi which means rc.subr cant find it.

Removing the line above appears to make everything work nicely when using a non-default uwsgi_program. Works for me at least :)

Thanks!
Comment 1 Walter Schwarzenfeld freebsd_triage 2018-02-05 13:46:52 UTC
Feedback please!
Comment 2 Walter Schwarzenfeld freebsd_triage 2019-09-04 15:35:01 UTC
Maintainer feedback,please!
Comment 3 Alexey Dokuchaev freebsd_committer freebsd_triage 2021-02-10 08:20:35 UTC
That line was removed as part of ports r448441, so I guess we can close this now.
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2021-02-10 08:32:55 UTC
^Triage:

- Assign committer that resolved
- Set correct resolution (FIXED, by way of change (commit))