@llplmlyd
2019-09-30T16:28:37.000000Z
字数 232
阅读 658
Linux
#! /bin/bash
Dateformat=`date +%Y%m%d`
Basedir="/usr/local/nginx"
Logdir="${Basedir}/logs"
Logname="access"
[ -d Logdir ] && cd $Logdir ||exit 1
[ -d Basedir ]||exit 1
/bin/mv ${Logname}.log ${Dateformat}_${Logname}.log
$Basedir/nginx -s reload