摘要:
#nginx日志切割脚本#author: http://www.nginx.cn#!/bin/bash#设置日志文件存放目录logs_path="/usr/local/nginx/logs/"#设置pid文件pid_path="/usr/local/nginx/nginx.pid"#重命名日志文件mv ${logs_path}access.log ${logs_path}access_$(date -d "yesterday" +"%Y%m%d").log#向nginx主进程发信号重新打开日志kill -USR1 阅读全文