2019-03-26 07:54:20 +00:00
|
|
|
// +build !windows
|
|
|
|
|
2019-03-31 11:34:51 +00:00
|
|
|
package daemon
|
2019-03-26 07:54:20 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"os/signal"
|
|
|
|
"path/filepath"
|
|
|
|
"syscall"
|
2019-08-10 03:15:25 +00:00
|
|
|
|
2020-01-08 13:57:14 +00:00
|
|
|
"ehang.io/nps/lib/common"
|
2019-08-10 03:15:25 +00:00
|
|
|
"github.com/astaxie/beego"
|
2019-03-26 07:54:20 +00: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"))
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
}
|