Re: Logs from a service is not showing up in journalctl but showing up in syslog

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Do, 25.07.19 19:16, Debraj Manna (subharaj.manna@xxxxxxxxx) 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
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux