摘要:
#!/bin/sh while true; do #启动一个循环,定时检查进程是否存在 server=`ps aux | grep /opt/mongodb | grep -v grep` if [ ! "$server" ]; then echo `date "+%Y-%m-%d %H:%M:%S"` service restart #如果不存在就重新启动 nohup bin/mongod -- 阅读全文
posted @ 2019-12-29 23:32
zzhaoh
阅读(347)
评论(0)
推荐(0)