Skip to content
Permalink
Browse files

Rename environment variable for systemd startup notification

Use a more verbose name to emphasize the connection to systemd and
disambiguate from informational notifications sent to an external
service.
  • Loading branch information...
lovett committed May 28, 2019
1 parent 9cd66ed commit 3be3d6298ae773887fdcd979ff294265ed4b1bc4
Showing with 2 additions and 2 deletions.
  1. +1 −1 ansible/roles/application/templates/medley.service.j2
  2. +1 −1 medley.py
@@ -7,7 +7,7 @@ Type=notify
NotifyAccess=all
User=medley
Group=medley
Environment=MEDLEY_NOTIFY_STARTUP=1
Environment=MEDLEY_NOTIFY_SYSTEMD_AT_STARTUP=1
WorkingDirectory={{ project_root }}
ExecStart={{ project_root }}/venv/bin/python medley.py

@@ -209,7 +209,7 @@ def main():
cherrypy.engine.publish("logindex:parse")
cherrypy.engine.publish("bookmarks:add:fulltext")

if os.environ.get("MEDLEY_NOTIFY_STARTUP"):
if os.environ.get("MEDLEY_NOTIFY_SYSTEMD_AT_STARTUP"):
systemd_notifier = sdnotify.SystemdNotifier()
systemd_notifier.notify("READY=1")

0 comments on commit 3be3d62

Please sign in to comment.
You can’t perform that action at this time.