1
0
Fork 0
mirror of https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder.git synced 2024-10-16 13:50:46 +00:00

make independent of container run

This commit is contained in:
kx1t 2024-06-15 18:08:37 -04:00
parent 946e17f62c
commit 24dc56190d

View file

@ -1,4 +1,4 @@
#!/command/with-contenv bash
#!/bin/bash
# shellcheck shell=bash disable=SC2015,SC2162
#
@ -41,6 +41,20 @@ fi
AUSSIEADSB_KEY="${AUSSIEADSB_KEY:-$2}"
if ! which jq >/dev/null 2>&1; then
echo "For registration to work, we need to do a one-time installation of JQ to your system"
echo "Please be patient..."
if (( UID == 0 )); then
apt-get update -qq
apt-get install -o Dpkg::Options::="--force-confnew" -y --no-install-recommends -qq jq
else
sudo apt-get update -qq
sudo apt-get install -o Dpkg::Options::="--force-confnew" -y --no-install-recommends -qq jq
fi
fi
case "${1,,}" in
"-register")
if [[ -n "$AUSSIEADSB_KEY" ]]; then