Skip to content

Commit

Permalink
Merge branch 'simonrupf:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese authored Dec 9, 2024
2 parents 6c94bde + 4c178f4 commit 09dc050
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ bug reports and code to this ntp docker project:
- Gontier-Julien => https://github.com/Gontier-Julien
- Guru Govindan => https://github.com/ggovindan
- Kim Oliver Drechsel => https://github.com/kimdre
- Mingye Wang => https://github.com/Artoria2e5
- Nicolas Carrier => https://github.com/ncarrier
- Nicolas Innocenti => https://github.com/nicoinn
- Richard Coleman => https://github.com/microbug
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.20
FROM alpine:3.21

ARG BUILD_DATE

Expand Down
8 changes: 4 additions & 4 deletions assets/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if [ -z "${LOG_LEVEL}" ]; then
LOG_LEVEL=0
else
# confirm log level is between 0-3, since these are the only log levels supported
if [ "${LOG_LEVEL}" -gt 3 ]; then
if expr "${LOG_LEVEL}" : [^0123] > /dev/null; then
# level outside of supported range, let's set to default (0)
LOG_LEVEL=0
fi
Expand All @@ -52,15 +52,15 @@ for N in $NTP_SERVERS; do
# check if ntp server has a 127.0.0.0/8 address (RFC3330) indicating it's
# the local system clock
if [[ "${N_CLEANED}" == "127\."* ]]; then
echo "server "${N_CLEANED} >> ${CHRONY_CONF_FILE}
echo "server ${N_CLEANED}" >> ${CHRONY_CONF_FILE}
echo "local stratum 10" >> ${CHRONY_CONF_FILE}

# found external time servers
else
if [[ "${ENABLE_NTS:-false}" = true ]]; then
echo "server "${N_CLEANED}" iburst nts" >> ${CHRONY_CONF_FILE}
echo "server ${N_CLEANED} iburst nts" >> ${CHRONY_CONF_FILE}
else
echo "server "${N_CLEANED}" iburst" >> ${CHRONY_CONF_FILE}
echo "server ${N_CLEANED} iburst" >> ${CHRONY_CONF_FILE}
fi
fi
done
Expand Down

0 comments on commit 09dc050

Please sign in to comment.