mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2024-11-10 11:44:54 +03:00
Apply kardianos/service PR #144
This commit is contained in:
parent
e3d5f3e6e5
commit
40f2dc6a7d
3
vendor/github.com/kardianos/service/service_upstart_linux.go
generated
vendored
3
vendor/github.com/kardianos/service/service_upstart_linux.go
generated
vendored
@ -11,6 +11,7 @@ import (
|
||||
"os/signal"
|
||||
"regexp"
|
||||
"strings"
|
||||
"syscall"
|
||||
"text/template"
|
||||
"time"
|
||||
)
|
||||
@ -186,7 +187,7 @@ func (s *upstart) Run() (err error) {
|
||||
|
||||
s.Option.funcSingle(optionRunWait, func() {
|
||||
var sigChan = make(chan os.Signal, 3)
|
||||
signal.Notify(sigChan, os.Interrupt, os.Kill)
|
||||
signal.Notify(sigChan, syscall.SIGTERM, os.Interrupt)
|
||||
<-sigChan
|
||||
})()
|
||||
|
||||
|
4
vendor/github.com/kardianos/service/service_windows.go
generated
vendored
4
vendor/github.com/kardianos/service/service_windows.go
generated
vendored
@ -268,7 +268,7 @@ func (ws *windowsService) Run() error {
|
||||
|
||||
sigChan := make(chan os.Signal)
|
||||
|
||||
signal.Notify(sigChan, os.Interrupt, os.Kill)
|
||||
signal.Notify(sigChan, os.Interrupt)
|
||||
|
||||
<-sigChan
|
||||
|
||||
@ -311,7 +311,7 @@ func (ws *windowsService) Status() (Status, error) {
|
||||
case svc.Stopped:
|
||||
return StatusStopped, nil
|
||||
default:
|
||||
return StatusUnknown, fmt.Errorf("unknown status %s", status)
|
||||
return StatusUnknown, fmt.Errorf("unknown status %v", status)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user