【发布时间】:2014-04-11 16:58:17
【问题描述】:
我已打开此协议端口以从 Python、PHP 应用程序远程读取,但每天它都会崩溃并且端口不可用,因此 Python、PHP 所有客户端应用程序都失败了
$ cat /var/tmp/server.sh
#!/bin/bash
while true; do tail -f /usr/local/freeswitch/log/freeswitch.log | nc -l -p 9999 -q 1 &
问。有没有办法让这个脚本总是像service this start or stop一样运行,如果它崩溃了,它会以某种方式自动重新启动?任何建议或链接做这样的事情?我正在使用 CentOS 6.x
【问题讨论】: