Create and modify unit files for systemd - Red Hat Customer Portal
The "Example 9.17 postfix.service Unit File" on the page above contains:
EnvironmentFile=-/etc/sysconfig/network
ExecStartPre= - /usr/libexec/postfix/aliasesdb
ExecStartPre= -/usr/libexec/postfix/chroot-update
I don't know what the leading hyphen means.
Is it the systemd unit file format?
Or is the content of the Linux command grammatically meaningful?
(From comments)
According to Understanding Systemd Units and Unit Files, for ExecStartPre
, they can be preceded by "-" to indicate that the failure of the command will be filtered.
EnvironmentFile
is listed in systemd.exec(5)
as optionally prefixed with "-", which indicates that if the file does not exist, it will not be read and no error or warning message is logged.
.
© 2024 OneMinuteCode. All rights reserved.