如何读取cfengine 3中的pid文件,如果进程没有运行,如何重新启动它?
发布于 2011-05-29 20:05:53
在cfengine 2中,我使用了如下内容:
processes:
"httpd" restart "/etc/init.d/apache restart"在cfengine 3中,进程的重新启动必须被编码为一个单独的命令。
processes:
"httpd"
restart_class => "start_httpd";
commands:
start_httpd::
"/etc/init.d/apache restart";如果httpd没有运行,这将定义类"start_httpd“。然后运行init脚本以确保启动。有关cf3参考手册如何工作的更深层次的说明,请参阅restart_class。
https://serverfault.com/questions/125044
复制相似问题