![](/img/trans.png)
[英]Systemd - detect in ExecStopPost whether service exited without error
[英]ExecStopPost is not getting executed if Service is not running in Systemctl
问题是我的服务未运行,并且我试图执行stop service命令。 因此,如果我尝试使用systemctl stop $ servicename.service停止服务,则该服务未运行,该ExecStop命令将不会执行,因此我的ExecStopPost也不会得到执行。但是我希望即使执行该ExecStopPost命令我的服务未运行,我尝试执行stop service命令。
如果该服务未运行,则不会执行提供给ExecStopPost的命令。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.