-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(feed): add adsbhub support (#142)
* feat(feed): add adsbhub support
- Loading branch information
Showing
15 changed files
with
55 additions
and
0 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
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
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 @@ | ||
bundle |
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,4 @@ | ||
#!/command/with-contenv bash | ||
|
||
# exit container stop s6 | ||
kill 1 |
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,9 @@ | ||
#!/command/with-contenv bash | ||
|
||
if [ "$SERVICE_ENABLE_ADSBHUB" != "false" ]; then | ||
set -eo pipefail | ||
/usr/bin/adsbhub.sh 2>&1 | mawk -W interactive '{printf "%c[33m[adsbhub]%c[0m %s\n", 27, 27, $0}' | ||
# awk -W interactive ... (prefix log messages with color and "[adsbhub]") | ||
else | ||
tail -f /dev/null | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/command/with-contenv bash | ||
|
||
if [ "$SERVICE_ENABLE_ADSBHUB" != "false" ]; then | ||
set -eo pipefail | ||
if [ -z "$ADSBHUB_CKEY" ]; then | ||
for i in {1..5}; do | ||
echo "FATAL: ADSBHUB_CKEY not set!" | mawk -W interactive '{printf "%c[33m[adsbhub]%c[0m %s\n", 27, 27, $0}' | ||
done | ||
kill 1 | ||
exit 1 | ||
fi | ||
wget https://www.adsbhub.org/downloads/adsbhub.php --no-check-certificate -O /usr/bin/adsbhub.sh | ||
awk -v new_CKEY="$ADSBHUB_CKEY" '/^ckey=/ {$0 = "ckey=\"" new_CKEY "\""} 1' "/usr/bin/adsbhub.sh" > "/usr/bin/adsbhub.sh.tmp" | ||
mv /usr/bin/adsbhub.sh.tmp /usr/bin/adsbhub.sh | ||
chmod 755 /usr/bin/adsbhub.sh | ||
fi |
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 @@ | ||
oneshot |
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 @@ | ||
/etc/s6-overlay/s6-rc.d/conf-adsbhub/script |
Empty file.
Empty file.