![](/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.