Am Sun, 8 May 2016 13:05:34 +0200 schrieb Reindl Harald <[email protected]>:
> Am 07.05.2016 um 15:00 schrieb Cecil Westerhof: > > I have written a Bash script to be used for a service. Is it > > possible to see in the script if it is run from systemd? I could > > use this for debugging purposes > > just set a environment variable in the systemd unit or check against > a lot of env-vars missing which are there in a ordinary shell but > removed from systemd to start with a clean anvironement Probably it would also work to look at $PPID which should be 1 if running under systemd - I have not tried that, tho. But keep in mind that this may not be systemd-specific. And, if you daemonize, the parent may switch to 1. -- Regards, Kai Replies to list-only preferred.
pgpDoDKHQQHaW.pgp
Description: Digitale Signatur von OpenPGP
_______________________________________________ systemd-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/systemd-devel
