diff --git a/root/etc/s6-overlay/s6-rc.d/conf-adsbhub/script b/root/etc/s6-overlay/s6-rc.d/conf-adsbhub/script index 9b6076a..6249c4c 100755 --- a/root/etc/s6-overlay/s6-rc.d/conf-adsbhub/script +++ b/root/etc/s6-overlay/s6-rc.d/conf-adsbhub/script @@ -1,6 +1,7 @@ #!/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}' @@ -8,9 +9,7 @@ if [ "$SERVICE_ENABLE_ADSBHUB" != "false" ]; then kill 1 exit 1 fi - - cd /usr/bin - wget https://www.adsbhub.org/downloads/adsbhub.php --no-check-certificate -O adsbhub.sh - chmod 755 adsbhub.sh - sed -i "s/^ckey=.*/ckey=$ADSBHUB_CKEY/" "adsbhub.sh" + wget https://www.adsbhub.org/downloads/adsbhub.php --no-check-certificate -O /usr/bin/adsbhub.sh + chmod 755 /usr/bin/adsbhub.sh + sed -i "s/^ckey=.*/ckey=$ADSBHUB_CKEY/" "/usr/bin/adsbhub.sh" fi diff --git a/root/etc/s6-overlay/s6-rc.d/conf-adsbhub/up b/root/etc/s6-overlay/s6-rc.d/conf-adsbhub/up index 92a6e25..8df9009 100755 --- a/root/etc/s6-overlay/s6-rc.d/conf-adsbhub/up +++ b/root/etc/s6-overlay/s6-rc.d/conf-adsbhub/up @@ -1 +1 @@ -/etc/s6-overlay/s6-rc.d/confd-piaware/script \ No newline at end of file +/etc/s6-overlay/s6-rc.d/conf-adsbhub/script \ No newline at end of file