mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Merge pull request #2405 from kenoss/feature/warn-if-sdnotify-and-daemon
Warn in the case of bad systemd configuration
This commit is contained in:
commit
96ab8ba05a
@ -218,6 +218,11 @@ class Application(BaseApplication):
|
||||
debug.spew()
|
||||
|
||||
if self.cfg.daemon:
|
||||
if os.environ.get('NOTIFY_SOCKET'):
|
||||
msg = "Warning: you shouldn't specify `daemon = True`" \
|
||||
" when launching by systemd with `Type = notify`"
|
||||
print(msg, file=sys.stderr, flush=True)
|
||||
|
||||
util.daemonize(self.cfg.enable_stdio_inheritance)
|
||||
|
||||
# set python paths
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user