Allow to rotate logs on demand

Log file can be rotated sending a SIGUSR1 signal on Unix based systems and
using "sftpgo service rotatelogs" on Windows

Fixes #133
This commit is contained in:
Nicola Murino
2020-06-22 19:11:53 +02:00
parent 44fb276464
commit 0056984d4b
14 changed files with 127 additions and 18 deletions

View File

@@ -124,6 +124,7 @@ func (s *Service) Start() error {
func (s *Service) Wait() {
if s.PortableMode != 1 {
registerSigHup()
registerSigUSR1()
}
<-s.Shutdown
}