mirror of
https://github.com/minoplhy/docker-ripe-atlas.git
synced 2025-04-21 12:26:59 +00:00
allow RXTXRPT option to be set via Docker env var
This commit is contained in:
parent
ddb01510b8
commit
98703012ef
@ -1,7 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
CONFIG_FILE="/var/atlas-probe/state/config.txt"
|
||||
declare -a OPTIONS=(
|
||||
"RXTXRPT"
|
||||
)
|
||||
|
||||
# create essential files and fix permission
|
||||
mkdir -p /var/atlas-probe/status
|
||||
chown -R atlas:atlas /var/atlas-probe/status
|
||||
mkdir -p /var/atlas-probe/etc
|
||||
chown -R atlas:atlas /var/atlas-probe/etc
|
||||
mkdir -p /var/atlas-probe/state
|
||||
chown -R atlas:atlas /var/atlas-probe/state
|
||||
echo "" > "${CONFIG_FILE}"
|
||||
|
||||
# set probe configuration
|
||||
for OPT in "${OPTIONS[@]}"; do
|
||||
if [ ! -z "${!OPT+x}" ]; then
|
||||
echo "Option ${OPT}=${!OPT}"
|
||||
echo "${OPT}=${!OPT}" >> "${CONFIG_FILE}"
|
||||
fi
|
||||
done
|
||||
|
||||
exec gosu atlas:atlas "$@"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user