Skip to content

Commit

Permalink
Default to 0.0.0.0 bind and allow free values
Browse files Browse the repository at this point in the history
  • Loading branch information
thespad committed May 26, 2024
1 parent 91bd3c6 commit 6387917
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ services:
- PUID=1000
- PGID=1000
- TZ=Europe/London
- IP="::" #optional
- IP=0.0.0.0 #optional
volumes:
- /path/to/py-kms/config:/config
ports:
Expand All @@ -65,7 +65,7 @@ docker run -d \
--name=py-kms \
-e PUID=1000 \
-e PGID=1000 \
-e IP="::" `#optional` \
-e IP=0.0.0.0 `#optional` \
-e TZ=Europe/London \
-p 1688:1688 \
-v /path/to/py-kms/config:/config \
Expand All @@ -83,7 +83,7 @@ Container images are configured using parameters passed at runtime (such as thos
| `-e PUID=1000` | for UserID - see below for explanation |
| `-e PGID=1000` | for GroupID - see below for explanation |
| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London |
| `-e IP=` | IP address to bind to. Use `0.0.0.0` for all IPv4 interfaces. Defaults to `"::"` for all IPv6 & IPv4 interfaces. |
| `-e IP=` | IP address to bind to. Use `0.0.0.0` for all IPv4 interfaces, use `::` for all IPv6 interfaces, or specify a full address. Note that for compose you must quote the full variable, e.g. `- "IP=0.0.0.0"` or `- "IP=::"`. |
| `-v /config` | Contains all relevant configuration files. |

## User / Group Identifiers
Expand Down
12 changes: 3 additions & 9 deletions root/etc/s6-overlay/s6-rc.d/svc-py-kms/run
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash

if [[ ${LEGACY_NET,,} = "true" ]]; then
exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost ${PORT}" \
cd /home/py-kms s6-setuidgid abc python3 -u pykms_Server.py "0.0.0.0" "${PORT}" -l "${LCID}" -c "${CLIENT_COUNT}" -a "${ACTIVATION_INTERVAL}" -r "${RENEWAL_INTERVAL}" -w "${HWID}" -V "${LOGLEVEL}" -F "${LOGFILE}"
else
exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost ${PORT}" \
cd /home/py-kms s6-setuidgid abc python3 -u pykms_Server.py "${IP:-::}" "${PORT}" -l "${LCID}" -c "${CLIENT_COUNT}" -a "${ACTIVATION_INTERVAL}" -r "${RENEWAL_INTERVAL}" -w "${HWID}" -V "${LOGLEVEL}" -F "${LOGFILE}"
fi
exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost ${PORT}" \
cd /home/py-kms s6-setuidgid abc python3 -u pykms_Server.py "${IP:-0.0.0.0}" "${PORT}" -l "${LCID}" -c "${CLIENT_COUNT}" -a "${ACTIVATION_INTERVAL}" -r "${RENEWAL_INTERVAL}" -w "${HWID}" -V "${LOGLEVEL}" -F "${LOGFILE}"

0 comments on commit 6387917

Please sign in to comment.