sftpgo-mirror/service/signals_windows.go
2021-06-26 07:31:41 +02:00

19 lines
290 B
Go

package service
import (
"os"
"os/signal"
"github.com/drakkan/sftpgo/v2/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)
}
}()
}