[PR #24] [MERGED] Feature/mg 359 - Service stopped of work in normal mode #228

Closed
opened 2026-02-26 04:34:33 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mageddo/dns-proxy-server/pull/24
Author: @mageddo
Created: 7/22/2017
Status: Merged
Merged: 7/22/2017
Merged by: @mageddo

Base: masterHead: feature/MG-359


📝 Commits (9)

  • d2ce005 MG-359 refactoring service install
  • 0ab2b99 MG-359 testing normal mode
  • 0c74b98 MG-359 Simplify the test
  • f7bfbb6 MG-359 fixing main file, and normal mode test
  • 0c60ece MG-359 fixing test
  • 693a0ab MG-359 unnecessary logs and removing service file
  • 9ae746b MG-359 pointing to const
  • 2566eb4 [Gradle Release Plugin] - releasing '2.0.21'.
  • def67e9 [Gradle Release Plugin] - new version commit: '2.0.22'.

📊 Changes

14 files changed (+293 additions, -179 deletions)

View changed files

📝 Dockerfile.hub (+1 -1)
📝 VERSION (+1 -1)
📝 builder (+3 -2)
dns-proxy-service (+0 -67)
📝 docker-compose.yml (+2 -2)
📝 gradle.properties (+1 -1)
📝 src/dns.go (+6 -14)
📝 src/github.com/mageddo/dns-proxy-server/conf/conf.go (+1 -91)
📝 src/github.com/mageddo/dns-proxy-server/flags/flags.go (+4 -0)
src/github.com/mageddo/dns-proxy-server/service/docker.go (+23 -0)
src/github.com/mageddo/dns-proxy-server/service/normal.go (+9 -0)
src/github.com/mageddo/dns-proxy-server/service/service.go (+191 -0)
src/github.com/mageddo/dns-proxy-server/service/service_test.go (+39 -0)
📝 src/github.com/mageddo/dns-proxy-server/utils/utils.go (+12 -0)

📄 Description

Since 2.0.20 the Docker service setup has stopped of work using normal mode

How to reproduce

$ sudo ./build/dns-proxy-server --service=normal
17-07-20 18:11:08.966 INF m=ConfigSetupService, status=script, script=\/home\/elvis\/dev\/projects\/dns-proxy-server\/build\/dns-proxy-server%!(EXTRA int=5380, int=5380, string=2.0.20)
17-07-20 18:11:08.966 INF m=Exec, cmd=sed, args=[-i s/<SCRIPT>/\/home\/elvis\/dev\/projects\/dns-proxy-server\/build\/dns-proxy-server%!(EXTRA int=5380, int=5380, string=2.0.20)/g /etc/init.d/dns-proxy-server]
17-07-20 18:11:08.967 INF m=Exec, status=success, cmd=sed
17-07-20 18:11:08.967 INF m=Exec, cmd=sh, args=[-c command -v update-rc.d || false]
17-07-20 18:11:08.968 INF m=Exec, status=success, cmd=sh
17-07-20 18:11:08.968 INF m=Exec, cmd=update-rc.d, args=[dns-proxy-server defaults]
17-07-20 18:11:08.994 INF m=Exec, status=success, cmd=update-rc.d
17-07-20 18:11:08.994 INF m=Exec, cmd=service, args=[dns-proxy-server stop]
17-07-20 18:11:09.008 INF m=Exec, status=error, type=*exec.ExitError, err=exit status 2
17-07-20 18:11:09.008 DEB status=stop-service, msg=out=/etc/init.d/dns-proxy-server: 11: /etc/init.d/dns-proxy-server: Syntax error: "(" unexpected
17-07-20 18:11:09.008 INF m=Exec, cmd=service, args=[dns-proxy-server start]
17-07-20 18:11:09.009 INF m=Exec, status=error, type=*exec.ExitError, err=exit status 2
17-07-20 18:11:09.010 CRI status=start-service, msg=exit status 2

What happen

The DNS Proxy server doesn't install as a service

What is expected

The DNS Proxy server installed as a service

Cause

The cause is the line src/github.com/mageddo/dns-proxy-server/conf/conf.go:274, the fmt verbs don't exist at this point when in normal mode


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mageddo/dns-proxy-server/pull/24 **Author:** [@mageddo](https://github.com/mageddo) **Created:** 7/22/2017 **Status:** ✅ Merged **Merged:** 7/22/2017 **Merged by:** [@mageddo](https://github.com/mageddo) **Base:** `master` ← **Head:** `feature/MG-359` --- ### 📝 Commits (9) - [`d2ce005`](https://github.com/mageddo/dns-proxy-server/commit/d2ce005e4946187ce966efac2d35f44bd50455ea) MG-359 refactoring service install - [`0ab2b99`](https://github.com/mageddo/dns-proxy-server/commit/0ab2b996fa9026ade0fc2f5c60cb17765afbea8a) MG-359 testing normal mode - [`0c74b98`](https://github.com/mageddo/dns-proxy-server/commit/0c74b98eb6df39869ca3f4b5ef6f0ed07c9280e7) MG-359 Simplify the test - [`f7bfbb6`](https://github.com/mageddo/dns-proxy-server/commit/f7bfbb6cdbedbe90ec7ec6efcc278bfe5a77bd89) MG-359 fixing main file, and normal mode test - [`0c60ece`](https://github.com/mageddo/dns-proxy-server/commit/0c60eceb96d6b6828e4f128f90a01c4b5781cee1) MG-359 fixing test - [`693a0ab`](https://github.com/mageddo/dns-proxy-server/commit/693a0ab0164922da025d685202ca2305def0d12c) MG-359 unnecessary logs and removing service file - [`9ae746b`](https://github.com/mageddo/dns-proxy-server/commit/9ae746be2218af3a692b2f1c49c36f9fe24608c1) MG-359 pointing to const - [`2566eb4`](https://github.com/mageddo/dns-proxy-server/commit/2566eb4f37fa57efd6df15ef5ae557b592da029c) [Gradle Release Plugin] - releasing '2.0.21'. - [`def67e9`](https://github.com/mageddo/dns-proxy-server/commit/def67e923c1edf81f79d4079647875d6c7234614) [Gradle Release Plugin] - new version commit: '2.0.22'. ### 📊 Changes **14 files changed** (+293 additions, -179 deletions) <details> <summary>View changed files</summary> 📝 `Dockerfile.hub` (+1 -1) 📝 `VERSION` (+1 -1) 📝 `builder` (+3 -2) ➖ `dns-proxy-service` (+0 -67) 📝 `docker-compose.yml` (+2 -2) 📝 `gradle.properties` (+1 -1) 📝 `src/dns.go` (+6 -14) 📝 `src/github.com/mageddo/dns-proxy-server/conf/conf.go` (+1 -91) 📝 `src/github.com/mageddo/dns-proxy-server/flags/flags.go` (+4 -0) ➕ `src/github.com/mageddo/dns-proxy-server/service/docker.go` (+23 -0) ➕ `src/github.com/mageddo/dns-proxy-server/service/normal.go` (+9 -0) ➕ `src/github.com/mageddo/dns-proxy-server/service/service.go` (+191 -0) ➕ `src/github.com/mageddo/dns-proxy-server/service/service_test.go` (+39 -0) 📝 `src/github.com/mageddo/dns-proxy-server/utils/utils.go` (+12 -0) </details> ### 📄 Description Since *2.0.20* the Docker service setup has stopped of work using normal mode How to reproduce ```bash $ sudo ./build/dns-proxy-server --service=normal 17-07-20 18:11:08.966 INF m=ConfigSetupService, status=script, script=\/home\/elvis\/dev\/projects\/dns-proxy-server\/build\/dns-proxy-server%!(EXTRA int=5380, int=5380, string=2.0.20) 17-07-20 18:11:08.966 INF m=Exec, cmd=sed, args=[-i s/<SCRIPT>/\/home\/elvis\/dev\/projects\/dns-proxy-server\/build\/dns-proxy-server%!(EXTRA int=5380, int=5380, string=2.0.20)/g /etc/init.d/dns-proxy-server] 17-07-20 18:11:08.967 INF m=Exec, status=success, cmd=sed 17-07-20 18:11:08.967 INF m=Exec, cmd=sh, args=[-c command -v update-rc.d || false] 17-07-20 18:11:08.968 INF m=Exec, status=success, cmd=sh 17-07-20 18:11:08.968 INF m=Exec, cmd=update-rc.d, args=[dns-proxy-server defaults] 17-07-20 18:11:08.994 INF m=Exec, status=success, cmd=update-rc.d 17-07-20 18:11:08.994 INF m=Exec, cmd=service, args=[dns-proxy-server stop] 17-07-20 18:11:09.008 INF m=Exec, status=error, type=*exec.ExitError, err=exit status 2 17-07-20 18:11:09.008 DEB status=stop-service, msg=out=/etc/init.d/dns-proxy-server: 11: /etc/init.d/dns-proxy-server: Syntax error: "(" unexpected 17-07-20 18:11:09.008 INF m=Exec, cmd=service, args=[dns-proxy-server start] 17-07-20 18:11:09.009 INF m=Exec, status=error, type=*exec.ExitError, err=exit status 2 17-07-20 18:11:09.010 CRI status=start-service, msg=exit status 2 ``` *What happen* The DNS Proxy server doesn't install as a service *What is expected* The DNS Proxy server installed as a service *Cause* The cause is the line *src/github.com/mageddo/dns-proxy-server/conf/conf.go:274*, the fmt verbs don't exist at this point when in normal mode --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 04:34:33 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dns-proxy-server-mageddo#228
No description provided.