Skip to content

Commit

Permalink
Merge branch 'Artoria2e5-bash'
Browse files Browse the repository at this point in the history
  • Loading branch information
simonrupf committed Dec 9, 2024
2 parents c8bd45d + 8bcbaef commit 4c178f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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
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 4c178f4

Please sign in to comment.