Skip to content

Commit 96fc59d

Browse files
authored
Merge pull request #300 from linuxserver/shellcheck
Shellcheck and formatting
2 parents 003b5d4 + c5b8744 commit 96fc59d

File tree

16 files changed

+108
-90
lines changed

16 files changed

+108
-90
lines changed

root/app/le-renew.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/with-contenv bash
2+
# shellcheck shell=bash
23

34
echo "<------------------------------------------------->"
45
echo

root/defaults/etc/letsencrypt/renewal-hooks/deploy/10-default

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/with-contenv bash
2+
# shellcheck shell=bash
23

34
cd /config/keys/letsencrypt || exit 1
45
openssl pkcs12 -export -out privkey.pfx -inkey privkey.pem -in cert.pem -certfile chain.pem -passout pass:
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
#!/usr/bin/with-contenv bash
2+
# shellcheck shell=bash
23

4+
# shellcheck source=/dev/null
35
. /config/.donoteditthisfile.conf
46

5-
if [ ! "$ORIGVALIDATION" = "dns" ] && [ ! "$ORIGVALIDATION" = "duckdns" ]; then
6-
if ps aux | grep 's6-supervise nginx' | grep -v grep >/dev/null; then
7+
if [[ ! "${ORIGVALIDATION}" = "dns" ]] && [[ ! "${ORIGVALIDATION}" = "duckdns" ]]; then
8+
if pgrep -f "s6-supervise nginx" >/dev/null; then
79
s6-svc -u /run/service/nginx
810
fi
911
else
10-
if ps aux | grep [n]ginx: >/dev/null; then
12+
if pgrep -f "nginx:" >/dev/null; then
1113
s6-svc -h /run/service/nginx
1214
fi
1315
fi
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#!/usr/bin/with-contenv bash
2+
# shellcheck shell=bash
23

4+
# shellcheck source=/dev/null
35
. /config/.donoteditthisfile.conf
46

5-
if [ ! "$ORIGVALIDATION" = "dns" ] && [ ! "$ORIGVALIDATION" = "duckdns" ]; then
6-
if ps aux | grep [n]ginx: >/dev/null; then
7+
if [[ ! "${ORIGVALIDATION}" = "dns" ]] && [[ ! "${ORIGVALIDATION}" = "duckdns" ]]; then
8+
if pgrep -f "nginx:" >/dev/null; then
79
s6-svc -d /run/service/nginx
810
fi
911
fi

root/etc/cont-init.d/30-test-run

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/with-contenv bash
2+
# shellcheck shell=bash
23

34
# Echo init finish for test runs
45
if [[ -n "${TEST_RUN}" ]]; then

root/etc/cont-init.d/31-require-url

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/with-contenv bash
2+
# shellcheck shell=bash
23

34
# check to make sure that the required variables are set
45
if [[ -z "${URL}" ]]; then

root/etc/cont-init.d/40-folders

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/with-contenv bash
2+
# shellcheck shell=bash
23

34
# make our folders and links
45
mkdir -p \

root/etc/cont-init.d/41-samples

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/with-contenv bash
2+
# shellcheck shell=bash
23

34
# samples are removed on init by the nginx base
45

root/etc/cont-init.d/42-fail2ban

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/with-contenv bash
2+
# shellcheck shell=bash
23

34
# copy/update the fail2ban config defaults to/in /config
45
cp -R /defaults/fail2ban/filter.d /config/fail2ban/

root/etc/cont-init.d/43-crontabs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/with-contenv bash
2+
# shellcheck shell=bash
23

34
# copy crontabs if needed
45
if [[ ! -f /config/crontabs/root ]]; then

0 commit comments

Comments
 (0)