Skip to content

Commit

Permalink
hadolint
Browse files Browse the repository at this point in the history
  • Loading branch information
tovisx committed Mar 20, 2024
1 parent b1fabe2 commit 0b0223e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FROM jlesage/baseimage-gui:debian-11-v4.5.3

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# hadolint ignore=DL3008
RUN set -x && \
TEMP_PACKAGES=() && \
KEPT_PACKAGES=() && \
Expand Down Expand Up @@ -53,8 +54,8 @@ RUN set -x && \
# Install packages.
apt-get update && \
apt-get install -y --no-install-recommends \
${KEPT_PACKAGES[@]} \
${TEMP_PACKAGES[@]} \
"${KEPT_PACKAGES[@]}" \
"${TEMP_PACKAGES[@]}" \
&& \

# mark libjanson4 as apt autoremoves it on clean and breaks libacars
Expand Down
9 changes: 5 additions & 4 deletions rootfs/etc/cont-init.d/50-create-jaero-config
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
#!/bin/bash

set -xe
set -e
set -u

# Create Jaero Config directory
if ! [[ -d /config/xdg/config/Jontisoft ]]; then
mkdir -p /config/xdg/config/Jontisoft/
fi

if [ ${NUMBER_OF_SDRX_TOPICS} -gt 20 ]; then
if [ "${NUMBER_OF_SDRX_TOPICS}" -gt 20 ]; then
echo "Please enter a SDRX topic number less than 21"
exit 1
else
for i in $(seq -f "%02g" 1 ${NUMBER_OF_SDRX_TOPICS}); do
for i in $(seq -f "%02g" 1 "${NUMBER_OF_SDRX_TOPICS}"); do
cat << END > /config/xdg/config/Jontisoft/"JAERO [${SDRX_TOPIC_NAME}$i].conf"
[General]
MQTT_enable=false
Expand Down Expand Up @@ -53,4 +54,4 @@ size=1
END

done
fi
fi
5 changes: 3 additions & 2 deletions rootfs/etc/cont-init.d/51-create-jaero-startapp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

set -xe
set -e
set -u

STARTAPP=/startapp.sh

Expand All @@ -9,7 +10,7 @@ HOME=/config
export HOME
EOF

for i in $(seq -f "%02g" 1 ${NUMBER_OF_SDRX_TOPICS}); do
for i in $(seq -f "%02g" 1 "${NUMBER_OF_SDRX_TOPICS}"); do
jaerostart=("/opt/jaero/JAERO -s ${SDRX_TOPIC_NAME}$i")
cat << EOF >> ${STARTAPP}
${jaerostart[@]} > /dev/null 2>&1 &
Expand Down

0 comments on commit 0b0223e

Please sign in to comment.