-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add zonetable external load mechanism; make remote pyalive check conf…
…igurable; add license headers; bug fixes (#76) * auto dns/port selection based on zone * add zone map * Update README.md * make use of zonetable persistent across all functions * make logging more consistent * cleanup * cleanup * made ImAlive more robust * add EU zones * improve zonetable to auto-extract zone names; add EU zones * Update README.md * add FALLBACK_IMALIVE_SERVICE * Update zonetable * implement zonetable auto updates * Update imalive * Update zonetable-update * Update zonetable-update * Update zonetable * change to test zonetable downloads * Create imalive-original * Update Dockerfile * Update imalive * Update zonetable-update * Update zonetable * Update zonetable-update * Update zonetable * Update imalive * Update imalive * Update imalive * Update imalive * Update zonetable * Update zonetable-update * Update zonetable-update * Update zonetable * Update imalive * Update zonetable * Update zonetable-update * Update zonetable * Update 50-radarvirtuel * Update 55-mlat-client * Update imalive * Update mlat-client * Update radarvirtuel * Update zonetable-update * Update healthcheck.sh * remove file
- Loading branch information
Showing
14 changed files
with
234 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
exec /etc/s6-overlay/scripts/zonetable-update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
longrun |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/command/with-contenv bash | ||
# shellcheck shell=bash disable=SC1091,SC2015,SC2145,SC2154 | ||
|
||
#--------------------------------------------------------------------------------------------- | ||
# Copyright (C) 2023-2024, Ramon F. Kolb (kx1t) and contributors | ||
# | ||
# This program is free software: you can redistribute it and/or modify it | ||
# under the terms of the GNU General Public License as published by the | ||
# Free Software Foundation, either version 3 of the License, or (at your option) | ||
# any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, but | ||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License along with this program. | ||
# If not, see <https://www.gnu.org/licenses/>. | ||
#--------------------------------------------------------------------------------------------- | ||
|
||
source /scripts/common | ||
ZONETABLE_CHECK_INT="${ZONETABLE_CHECK_INT:-7200}" # check every 2 hours | ||
ZONETABLE_URL="${ZONETABLE_URL:-https://raw.githubusercontent.com/sdr-enthusiasts/docker-radarvirtuel/main/rootfs/home/zonetable}" | ||
|
||
"${s6wrap[@]}" echo "[INFO] checking if zonetable needs to get updated" | ||
|
||
if curl -sSL "${ZONETABLE_URL}" -o /tmp/zonetable >/dev/null 2>&1; then | ||
if [[ -n "$(comm --nocheck-order -3 /home/zonetable /tmp/zonetable 2>/dev/null)" ]]; then | ||
"${s6wrap[@]}" echo "[INFO] zonetable has changed, installing new version" | ||
while [[ -f /run/zonetable.lock ]]; do sleep 1; done | ||
touch /run/zonetable.lock | ||
mv -f /tmp/zonetable /home/zonetable | ||
chmod +x /home/zonetable | ||
rm -f /run/zonetable.lock | ||
else | ||
"${s6wrap[@]}" echo "[INFO] zonetable has not changed since last check" | ||
rm -f /tmp/zonetable | ||
fi | ||
else | ||
"${s6wrap[@]}" echo "[WARNING] couldn't reach the remote server with the latest zonetable - we will keep on using the current table" | ||
fi | ||
|
||
"${s6wrap[@]}" echo "[INFO] next zonetable update check will be at $(date -d "+$ZONETABLE_CHECK_INT seconds" | xargs)" | ||
sleep $ZONETABLE_CHECK_INT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.