shell 脚本
#!/bin/bash
a=`netstat -unltp|grep fdfs|wc -l`
echo "$a"
if [ "$a" -ne "1" ];then
`fdfs_storaged /etc/fdfs/storage.conf start`
fi
用 crontab 设定定时任务
crontab -e,一分钟执行一次脚本
* * * * * sh /home/fr/test.sh
查看 crontab 日志
tailf var/log/cron