diff --git a/bot.py b/bot.py index 28db42a453..9d2e3f7995 100644 --- a/bot.py +++ b/bot.py @@ -108,6 +108,12 @@ def hosting_method(self) -> HostingMethod: if os.environ.get("pm_id"): return HostingMethod.PM2 + if os.environ.get("INVOCATION_ID"): + return HostingMethod.SYSTEMD + + if os.environ.get("TERM"): + return HostingMethod.SCREEN + return HostingMethod.OTHER def startup(self): diff --git a/core/models.py b/core/models.py index 81247d387d..37355a488a 100644 --- a/core/models.py +++ b/core/models.py @@ -277,3 +277,5 @@ class HostingMethod(IntEnum): HEROKU = 0 PM2 = 1 OTHER = 2 + SYSTEMD = 3 + SCREEN = 4