From 3a10b0889e5908e6a3096bf2968ddee6202122df Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Mon, 24 Sep 2018 18:36:11 -0400 Subject: [PATCH] update for shellcheck Signed-off-by: Jess Frazelle --- tor-relay/run.sh | 2 +- unifi/entrypoint.sh | 1 + wireguard/install/entrypoint.sh | 1 + ykman/Dockerfile | 1 + ykman/entrypoint.sh | 3 ++- ykpersonalize/entrypoint.sh | 3 ++- yubico-piv-tool/Dockerfile | 1 + yubico-piv-tool/entrypoint.sh | 3 ++- 8 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tor-relay/run.sh b/tor-relay/run.sh index 08a3a9d..01caa0b 100644 --- a/tor-relay/run.sh +++ b/tor-relay/run.sh @@ -12,4 +12,4 @@ for relaytype in bridge middle exit; do sed -i 's/${RELAY_PORT}/'"$RELAY_PORT"'/g' "/etc/tor/torrc.$relaytype" done -exec tor -f /etc/tor/torrc.${RELAY_TYPE} +exec tor -f "/etc/tor/torrc.${RELAY_TYPE}" diff --git a/unifi/entrypoint.sh b/unifi/entrypoint.sh index 04b5134..bcdf74a 100755 --- a/unifi/entrypoint.sh +++ b/unifi/entrypoint.sh @@ -34,4 +34,5 @@ fi chown -R unifi:unifi /config /usr/lib/unifi +# shellcheck disable=SC2068 exec gosu unifi $@ diff --git a/wireguard/install/entrypoint.sh b/wireguard/install/entrypoint.sh index 4e24bcf..ed14b21 100755 --- a/wireguard/install/entrypoint.sh +++ b/wireguard/install/entrypoint.sh @@ -13,4 +13,5 @@ make clean echo "Successfully built and installed the wireguard kernel module!" +# shellcheck disable=SC2068 exec $@ diff --git a/ykman/Dockerfile b/ykman/Dockerfile index 6d1c253..aa981a3 100644 --- a/ykman/Dockerfile +++ b/ykman/Dockerfile @@ -11,6 +11,7 @@ LABEL maintainer "Jessie Frazelle " RUN apt-get update && apt-get install -y \ pcscd \ + procps \ software-properties-common \ --no-install-recommends && \ add-apt-repository ppa:yubico/stable && \ diff --git a/ykman/entrypoint.sh b/ykman/entrypoint.sh index fe72a9d..8328390 100755 --- a/ykman/entrypoint.sh +++ b/ykman/entrypoint.sh @@ -3,7 +3,8 @@ set -e set -o pipefail init(){ - local pcscd_running=$(ps -aux | grep [p]cscd) + local pcscd_running + pcscd_running=$(pgrep pcscd) if [ -z "$pcscd_running" ]; then echo "starting pcscd in backgroud" pcscd --debug --apdu diff --git a/ykpersonalize/entrypoint.sh b/ykpersonalize/entrypoint.sh index fe72a9d..8328390 100755 --- a/ykpersonalize/entrypoint.sh +++ b/ykpersonalize/entrypoint.sh @@ -3,7 +3,8 @@ set -e set -o pipefail init(){ - local pcscd_running=$(ps -aux | grep [p]cscd) + local pcscd_running + pcscd_running=$(pgrep pcscd) if [ -z "$pcscd_running" ]; then echo "starting pcscd in backgroud" pcscd --debug --apdu diff --git a/yubico-piv-tool/Dockerfile b/yubico-piv-tool/Dockerfile index 0a876e6..fcee9d0 100644 --- a/yubico-piv-tool/Dockerfile +++ b/yubico-piv-tool/Dockerfile @@ -15,6 +15,7 @@ RUN apt-get update && apt-get install -y \ add-apt-repository ppa:yubico/stable && \ apt-get update && apt-get install -y \ pcscd \ + procps \ usbutils \ yubico-piv-tool \ && rm -rf /var/lib/apt/lists/* diff --git a/yubico-piv-tool/entrypoint.sh b/yubico-piv-tool/entrypoint.sh index fe72a9d..8328390 100755 --- a/yubico-piv-tool/entrypoint.sh +++ b/yubico-piv-tool/entrypoint.sh @@ -3,7 +3,8 @@ set -e set -o pipefail init(){ - local pcscd_running=$(ps -aux | grep [p]cscd) + local pcscd_running + pcscd_running=$(pgrep pcscd) if [ -z "$pcscd_running" ]; then echo "starting pcscd in backgroud" pcscd --debug --apdu