mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-29 02:50:29 +00:00
19 lines
287 B
Go
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)
|
|
}
|
|
}()
|
|
}
|