From 9ae746be2218af3a692b2f1c49c36f9fe24608c1 Mon Sep 17 00:00:00 2001 From: Elvis de Freitas Date: Sat, 22 Jul 2017 19:38:41 -0300 Subject: [PATCH] MG-359 pointing to const --- src/github.com/mageddo/dns-proxy-server/service/service.go | 6 +++--- src/github.com/mageddo/dns-proxy-server/utils/env/env.go | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/github.com/mageddo/dns-proxy-server/service/service.go b/src/github.com/mageddo/dns-proxy-server/service/service.go index 17bb8b60b..f12ec0a7a 100644 --- a/src/github.com/mageddo/dns-proxy-server/service/service.go +++ b/src/github.com/mageddo/dns-proxy-server/service/service.go @@ -99,14 +99,14 @@ func (sc *Service) Uninstall() error { sc.logger.Infof("status=begin") var err error - if out, err, _ := utils.Exec("service", "dns-proxy-server", "stop"); err != nil { + if out, err, _ := utils.Exec("service", DNS_PROXY_SERVER_SERVICE, "stop"); err != nil { sc.logger.Infof("status=stop-fail, msg=maibe-no-running, out=%s", string(out)) } if utils.Exists("update-rc.d") { - _, err, _ = utils.Exec("update-rc.d", "-f", "dns-proxy-server", "remove") + _, err, _ = utils.Exec("update-rc.d", "-f", DNS_PROXY_SERVER_SERVICE, "remove") } else if utils.Exists("chkconfig") { - _, err, _ = utils.Exec("chkconfig", "dns-proxy-server", "off") + _, err, _ = utils.Exec("chkconfig", DNS_PROXY_SERVER_SERVICE, "off") } else { sc.logger.Warningf("status=impossible to remove service") } diff --git a/src/github.com/mageddo/dns-proxy-server/utils/env/env.go b/src/github.com/mageddo/dns-proxy-server/utils/env/env.go index 2ebf86fa2..d5f338010 100644 --- a/src/github.com/mageddo/dns-proxy-server/utils/env/env.go +++ b/src/github.com/mageddo/dns-proxy-server/utils/env/env.go @@ -4,5 +4,4 @@ package env const ( MG_WORK_DIR = "MG_WORK_DIR" MG_RESOLVCONF = "MG_RESOLVCONF" - MG_SERVICE_PATH = "MG_SERVICE_PATH" )