Skip to content

Commit 291f465

Browse files
authored
Update ee-nginx-proxy-log
1 parent 709b237 commit 291f465

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

logrotate/logrotate.d/ee-nginx-proxy-log

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22
{
33
weekly
44
missingok
5-
copytruncate
65
rotate 12
76
compress
87
delaycompress
98
notifempty
10-
create 0640 root root
119
sharedscripts
10+
postrotate
11+
# Send signal USR1 to nginx-proxy container
12+
$(sudo /usr/bin/docker inspect -f '{{ .State.Pid }}' services_global-nginx-proxy_1 | xargs sudo /usr/bin/kill -USR1) || echo "ok"
13+
14+
# Write log
15+
echo "$(date +'[%d/%m/%Y %H:%M:%S]') LogRotate.INFO: Rotated logs for nginx-proxy" | sudo tee -a /opt/easyengine/logs/ee.log >/dev/null
16+
endscript
1217
}

0 commit comments

Comments
 (0)