Automatically write a logrotate file to the disk when wings boots if directory exists; closes pterodactyl/panel#2312

This commit is contained in:
Dane Everitt
2020-09-03 20:13:51 -07:00
parent b6008108ac
commit e09cc3d2dd
4 changed files with 66 additions and 3 deletions

13
templates/logrotate.tpl Normal file
View File

@@ -0,0 +1,13 @@
{{.LogDirectory}}/wings.log {
size 10M
compress
delaycompress
dateext
maxage 7
missingok
notifempty
create 0640 {{.User.Uid}} {{.User.Gid}}
postrotate
killall -SIGHUP wings
endscript
}