我需要覆盖systemd模板的ExecStart
参数。我已确认单元文件存在并通过验证。添加[email protected]/override.conf
文件在某些机器上效果很好:
user@prod-west-1604$ systemctl --version | head -1
systemd 229
user@prod-west-1604$ file -b /etc/systemd/system/[email protected]
symbolic link to /lib/systemd/system/nginx.service
user@prod-west-1604$ sudo systemctl edit [email protected]
# (opens editor as expected)
但是,在运行较新 systemd 版本的机器上,操作会失败:
user@prod-east-1810$ systemctl --version | head -1
systemd 239
user@prod-east-1810$ file -b /etc/systemd/system/[email protected]
symbolic link to /lib/systemd/system/nginx.service
user@prod-east-1810$ sudo systemctl edit [email protected]
Failed to get the load state of [email protected]: Unit name [email protected] is neither a valid invocation ID nor unit name.
为什么?