Re: [systemd-devel] Detecting when running under systemd

2022-08-17 Thread Peter Hoeg
you want to check specifically whether stderr is tied to the journal, for which you can use JOURNAL_STREAM You are right, nice catch! (In addition to disabling the timestamps you should *at least* add message priority indicators as well, either by using SyslogLevelPrefix=, or by avoiding

Re: [systemd-devel] Detecting when running under systemd

2022-08-16 Thread Mantas Mikulėnas
On Wed, Aug 17, 2022 at 5:05 AM Peter Hoeg wrote: > > Hi all, > > I have a small program that queries an external web API, massages the data > and passes it off to something else. As I only need it to run during > certain windows and I didn't want to have to bother with making sure it was > alive

[systemd-devel] Detecting when running under systemd

2022-08-16 Thread Peter Hoeg
Hi all, I have a small program that queries an external web API, massages the data and passes it off to something else. As I only need it to run during certain windows and I didn't want to have to bother with making sure it was alive, I am starting it using a systemd timer which is sufficien