#!/bin/bash
# This script run at 00:00
# The Nginx logs path
logs_path="/data/logs"
mkdir -p $logs_path/`date -d "yesterday" +"%Y"`/`date -d "yesterday" +"%m"`/
mv $logs_path/game.log $logs_path/`date -d "yesterday" +"%Y"`/`date -d "yesterday" +"%m"`/game_`date -d "yesterday" +"%Y%m%d"`.log
kill -USR1 `cat /usr/local/services/nginx/nginx.pid`
阅读(1467) | 评论(0) | 转发(1) |