我有几个here服务器坐在一个负载平衡器后面,我在这里找到了"watcher.py“:https://github.com/splitbrain/Watcher
我选择这个脚本有几个原因:递归通过文件夹,很多触发选项
无论如何,我将使用这个来同步负载平衡服务器之间的web内容。有办法确保这个脚本在启动时运行吗?
发布于 2013-04-19 21:22:54
我发现处理这样的应用程序最简单的方法是安装supervisord,然后使用它启动、监视和收集脚本中的输出。
下面是一个示例主管配置文件:
[program:watcher]
command = /usr/bin/python /path/to/watcher.py
stdout_logfile = /var/log/watcher-stdout.log
stdout_logfile_maxbytes = 10MB
stdout_logfile_backups = 5
stderr_logfile = /var/log/watcher-stderr.log
stderr_logfile_maxbytes = 10MB
stderr_logfile_backups = 5https://serverfault.com/questions/501071
复制相似问题