我遇到了一个新手问题,我想更新一个initconfiguration,但只是重新启动这个工作并不能应用这些改变。
例如:
xyz运行 /etc/init/xyz.conf来做一些事情。 restart xyz重新restart xyz作业 pre-stop部分不执行 我试着用initctl reload-configuration ,但没有任何效果。 如果我通过两个单独的步骤手动停止并开始工作,事情按预期工作。
根据文档 , 停止前节只在停止命令之前执行,而不是在(重新启动)期间执行。
Description: Command executed when a job in running state gets stopped (initctl stop or stop on event).
根据你正在尝试做什么,你可能无法避免这种行为。