From c95d8981eb48d5baa2a0c63d8be5486d0b3c2072 Mon Sep 17 00:00:00 2001 From: Jerry Aldrich Date: Thu, 3 Nov 2022 21:30:59 -0700 Subject: [PATCH] Add debug toggle --- README.md | 6 ++++++ entrypoint.sh | 11 ++++++++++- znc.conf.example | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6f7b53f..6b9a187 100644 --- a/README.md +++ b/README.md @@ -28,3 +28,9 @@ docker run --rm -it \ -p 8000:8000 \ jerryaldrichiii/znc ``` + +### Enabling debug mode + +``` +-e ZNC_DEBUG=true +``` diff --git a/entrypoint.sh b/entrypoint.sh index fe8b5da..15190fd 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -13,4 +13,13 @@ if [ -f /bootstrap/tls/znc.key ] && [ -f /bootstrap/tls/znc.crt ]; then cat /bootstrap/tls/znc.key /bootstrap/tls/znc.crt > /srv/znc/tls/znc.pem fi -/opt/znc/bin/znc --foreground --datadir "$DATADIR" +if [ "$ZNC_DEBUG" = "true" ]; then + ZNC_DEBUG="--debug" +else + ZNC_DEBUG="" +fi + +/opt/znc/bin/znc \ + --foreground \ + $ZNC_DEBUG \ + --datadir "$DATADIR" diff --git a/znc.conf.example b/znc.conf.example index f1f7af7..6a094b9 100644 --- a/znc.conf.example +++ b/znc.conf.example @@ -71,7 +71,7 @@ Version = 1.8.1 // To generate this block run: - // docker run -it --entrypoint "/opt/znc/bin/znc -s" jerryaldrichiii/znc + // docker run -it --entrypoint "/opt/znc/bin/znc" jerryaldrichiii/znc -s Method = sha256 Hash = e91a3f131f4f2aee652f6ecfca64330bfc74501445208320d6e114e270fa3c34