sftpgo-mirror/service/signals_windows.go
2021-03-25 19:31:21 +01:00

19 lines
287 B
Go

package service
import (
"os"
"os/signal"
"github.com/drakkan/sftpgo/logger"
)
func registerSignals() {
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt)
go func() {
for range c {
logger.Debug(logSender, "", "Received interrupt request")
os.Exit(0)
}
}()
}