Service installation: bail out with a meaningful error message on unsupported platforms

Fixes #154
This commit is contained in:
Frank Denis 2018-02-20 00:34:06 +01:00
parent 0fde986c63
commit 547e444afd
1 changed files with 3 additions and 0 deletions

View File

@ -44,6 +44,9 @@ func main() {
dlog.Noticef("dnscrypt-proxy %s", AppVersion)
if len(*svcFlag) != 0 {
if svc == nil {
dlog.Fatal("Built-in service installation is not supported on this platform")
}
if err := service.Control(svc, *svcFlag); err != nil {
dlog.Fatal(err)
}