Files

25 lines
355 B
Go
Raw Permalink Normal View History

2019-03-26 15:54:20 +08:00
// +build !windows
2019-03-31 19:34:51 +08:00
package daemon
2019-03-26 15:54:20 +08:00
import (
"os"
"os/signal"
"path/filepath"
"syscall"
2019-08-10 11:15:25 +08:00
2020-01-08 21:57:14 +08:00
"ehang.io/nps/lib/common"
2019-08-10 11:15:25 +08:00
"github.com/astaxie/beego"
2019-03-26 15:54:20 +08:00
)
func init() {
s := make(chan os.Signal, 1)
signal.Notify(s, syscall.SIGUSR1)
go func() {
for {
<-s
beego.LoadAppConfig("ini", filepath.Join(common.GetRunPath(), "conf", "nps.conf"))
}
}()
}