[systemd-devel] Logs from a service is not showing up in journalctl but showing up in syslog
Lennart Poettering
lennart at poettering.net
Mon Jul 29 12:38:16 UTC 2019
On Do, 25.07.19 19:16, Debraj Manna (subharaj.manna at gmail.com) wrote:
> Thanks Mantas for replying.
>
> ExecStartPre=-/bin/su ubuntu -c "/home/ubuntu/build-target/
> kafka/kafka-systemd-prestart.sh"
> ExecStart=/bin/su ubuntu -c "/home/ubuntu/build-target/
> kafka/kafka-systemd-health.sh"
> ExecStopPost=-/bin/bash /home/ubuntu/build-target/
> kafka/kafka-systemd-poststop.sh
>
> If I specify User= then all the scripts will be executed with that user.
> Can you let me know if I only need to execute
> kafka-systemd-prestart.sh and kafka-systemd-health.sh
> with let's say ubuntu user and kafka-systemd-poststop.sh with root user
> what is the recommended way to do this?
Use "ExecStartPre=+…" for running some ExecXYZ= lines with full
privileges. See documentation for details. You may combine "+" and "-"
if you like.
Lennart
--
Lennart Poettering, Berlin
More information about the systemd-devel
mailing list