Sign in
skia
/
buildbot
/
44c4ff80b592ca04eb2c1e40fce4bfb8aa4aa854
/
.
/
skfe
/
sys
/
rotate_nginx_logs.sh
blob: 688d449c18a202aeedea00cab4c68526341aac67 [
file
] [
log
] [
blame
]
#!/bin/bash
# This script renames the current nginx logfiles and sends a USR1 signal to
# nginx to re-open the log.
LOG_DIR
=
"/var/log/nginx"
NGINX_PID
=
"/run/nginx.pid"
rm
-
f $LOG_DIR
/*.
log
.
1
rename
's/.log$/.log.1/'
*
kill
-
USR1
`cat $NGINX_PID`