centos7-shell脚本判断fdfs掉线重启

#!/bin/bash
a=`netstat -unltp|grep fdfs_trackerd|wc -l`
b=`netstat -unltp|grep fdfs_stroraged|wc -l`

echo "$a"
if [ "$a" -ne "1" ];then
    `fdfs_trackerd /etc/fdfs/tracker.conf start`
fi
echo "$b"
if [ "$b" -ne "1" ];then
    `fdfs_storaged /etc/fdfs/storage.conf start`
fi

  

posted @ 2022-05-09 19:01  test_yu  阅读(55)  评论(0编辑  收藏  举报