Skip to content

Commit

Permalink
MG-359 pointing to const
Browse files Browse the repository at this point in the history
  • Loading branch information
mageddo committed Jul 22, 2017
1 parent 693a0ab commit 9ae746b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/github.com/mageddo/dns-proxy-server/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down
1 change: 0 additions & 1 deletion src/github.com/mageddo/dns-proxy-server/utils/env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ package env
const (
MG_WORK_DIR = "MG_WORK_DIR"
MG_RESOLVCONF = "MG_RESOLVCONF"
MG_SERVICE_PATH = "MG_SERVICE_PATH"
)

0 comments on commit 9ae746b

Please sign in to comment.