This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
k18-ntcs-web-ntc/src/main/resources/scripts/ng_daemon.sh

12 lines
303 B
Bash
Raw Normal View History

#! /bin/bash
nginxPath=/usr/local/nginx
pidFile=$nginxPath/logs/nginx.pid
logPath=$nginxPath/logs/daemon.log
while true;do
if [ ! -f $pidFile ]; then
echo "时间:`date '+%Y-%m-%d %T'` nginx进程不存在,开始启动nginx" >> $logPath
systemctl start nginx
fi
sleep 60
done