#nginx日志切割脚本
#!/bin/bash#设置日志文件存放目录logs_path="/var/log/nginx/"#设置pid文件pid_path="/var/run/nginx.pid"
#重命名日志文件mv ${logs_path}access.log ${logs_path}access_$(date -d "yesterday" +"%Y%m%d").log
#向nginx主进程发信号重新打开日志kill -USR1 `cat ${pid_path}`