From 0a29ae477eac429c730d8af66ebffb959ed40c9f Mon Sep 17 00:00:00 2001 From: aptalca Date: Mon, 7 Feb 2022 12:57:41 -0500 Subject: [PATCH] don't install curl/jq, they're already installed --- root/etc/cont-init.d/98-cloudflared-config | 28 ---------------------- 1 file changed, 28 deletions(-) diff --git a/root/etc/cont-init.d/98-cloudflared-config b/root/etc/cont-init.d/98-cloudflared-config index fafe919..571dbb7 100644 --- a/root/etc/cont-init.d/98-cloudflared-config +++ b/root/etc/cont-init.d/98-cloudflared-config @@ -16,19 +16,6 @@ else fi echo "**** Linux architecture found: ${ARCH} ****" -UBUNTU=false -ALPINE=false -if [ -f /usr/bin/apt ]; then - UBUNTU=true - echo "**** Linux distro found: ubuntu ****" -elif [ -f /sbin/apk ]; then - ALPINE=true - echo "**** Linux distro found: alpine ****" -else - echo "**** Unknown Linux distro, exiting... ****" - exit 1 -fi - echo "**** Checking for cloudflared setup script dependencies... ****" YQARCH="${ARCH}" if [ "${YQ_ARCH}" = "armhf" ]; then @@ -38,21 +25,6 @@ echo "**** Temporarily installing /tmp/yq... ****" curl -sLo /tmp/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_${YQARCH} chmod +x /tmp/yq -declare -A CLEANUP=( [curl]=false [jq]=false ) -for PKG in "${!CLEANUP[@]}"; do - if [ -x "$(command -v ${PKG})" ]; then - echo "**** ${PKG} already installed, skipping... ****" - else - CLEANUP[$PKG]=true - echo "**** Temporarily installing ${PKG}... ****" - if $ALPINE; then - apk add --no-cache ${PKG} - elif $UBUNTU; then - apt-get -qqy install --no-install-recommends ${PKG} - fi - fi -done - echo "**** Installing cloudflared...****" if [ -d "/cloudflared/" ]; then echo "**** Moving /cloudflared/cloudflared-${ARCH} to /usr/local/bin/cloudflared... ****"