mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-22 06:27:59 +00:00
properly detect if running via systemd
This commit is contained in:
parent
6112734b2f
commit
938d3f419e
|
@ -4,6 +4,7 @@ Description=ActivityPub Relay
|
|||
[Service]
|
||||
WorkingDirectory=/home/relay/relay
|
||||
ExecStart=/usr/bin/python3 -m relay run
|
||||
Environment="IS_SYSTEMD=1"
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -87,7 +87,7 @@ handlers: list[Any] = [logging.StreamHandler()]
|
|||
if env_log_file:
|
||||
handlers.append(logging.FileHandler(env_log_file))
|
||||
|
||||
if os.environ.get('INVOCATION_ID'):
|
||||
if os.environ.get('IS_SYSTEMD'):
|
||||
logging_format = '%(levelname)s: %(message)s'
|
||||
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue