Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
问题是我的服务没有运行,我试图执行停止服务命令。因此,如果我尝试使用 systemctl stop $servicename.service 停止服务,则服务未运行,因此 ExecStop 命令将不会被执行,因此我的 ExecStopPost 也不会被执行。但我希望即使执行 ExecStopPost 命令我的服务没有运行,我尝试执行停止服务命令。
如果服务未运行,则提供给 ExecStopPost 的命令将不会执行。