#!/bin/sh
cd /home/app/MspApp/bin
file_atime=`stat -c %Y quartz.log` #文件更新时间
now_time=`date +%s` #当前系统时间
if [ $[ ${now_time} - ${file_atime} ] -gt 3600 ] #一小时日志不刷新则重启进程
then
sh quartz.sh &
else
exit
fi
检测日志1小时不更新就重启服务
最新推荐文章于 2023-06-09 11:07:41 发布