我sh -c exec在ExecStart语句中(在服务单元文件中)使用习语来插入一些 shell 命令。例如:
sh -c exec
ExecStart
ExecStart=/bin/sh -ec "exec /usr/bin/foo $(/usr/bin/foo-config)"
它工作得很好。但是,当我查看此服务的日志时,进程名称sh不是foo. 有没有办法使用这个习语来对进程名称撒谎?
sh
foo
systemd systemd-journald
systemd ×1
systemd-journald ×1