Page MenuHomeDevCentral

D3422.id8832.diff
No OneTemporary

D3422.id8832.diff

diff --git a/roles/core/certificates/files/letsencrypt-renewal.sh b/roles/core/certificates/files/letsencrypt-renewal.sh
--- a/roles/core/certificates/files/letsencrypt-renewal.sh
+++ b/roles/core/certificates/files/letsencrypt-renewal.sh
@@ -19,7 +19,8 @@
nginx_output="$(nginx -t 2>&1)"
nginx_return_code="$?"
- if [ "$nginx_return_code" -eq 0 ] && [ -n "$(echo "${nginx_output}" | grep warn)" ]; then
+ if [ "$nginx_return_code" -eq 0 ] && echo "${nginx_output}" | grep warn; then
+ echo "Test passed, warnings found" >&2
return 2;
else
return "$nginx_return_code";
diff --git a/roles/mailserver/dkim/files/bin/get-dkim-dns-entries.sh b/roles/mailserver/dkim/files/bin/get-dkim-dns-entries.sh
--- a/roles/mailserver/dkim/files/bin/get-dkim-dns-entries.sh
+++ b/roles/mailserver/dkim/files/bin/get-dkim-dns-entries.sh
@@ -19,7 +19,7 @@
# Parses arguments
if [ $# -eq 0 ]
then
- echo "Usage: `basename $0` <domain>"
+ echo "Usage: $(basename "$0") <domain>"
exit 1
fi
@@ -32,7 +32,7 @@
exit 2
fi
-for f in $DIR/*.txt
+for f in "$DIR"/*.txt
do
- get-dkim-dns-entry $f
+ get-dkim-dns-entry "$f"
done
diff --git a/roles/mailserver/dkim/files/bin/get-dkim-key-table.sh b/roles/mailserver/dkim/files/bin/get-dkim-key-table.sh
--- a/roles/mailserver/dkim/files/bin/get-dkim-key-table.sh
+++ b/roles/mailserver/dkim/files/bin/get-dkim-key-table.sh
@@ -18,11 +18,11 @@
for d in /etc/opendkim/keys/*
do
- DOMAIN=`basename $d`
+ DOMAIN=$(basename "$d")
- for f in $d/*.private
+ for f in "$d"/*.private
do
- SELECTOR=`basename $f .private`
+ SELECTOR=$(basename "$f" .private)
echo "$SELECTOR._domainkey.$DOMAIN $DOMAIN:$SELECTOR:$f"
done
done
diff --git a/roles/mailserver/dkim/files/bin/get-dkim-signing-table.sh b/roles/mailserver/dkim/files/bin/get-dkim-signing-table.sh
--- a/roles/mailserver/dkim/files/bin/get-dkim-signing-table.sh
+++ b/roles/mailserver/dkim/files/bin/get-dkim-signing-table.sh
@@ -18,11 +18,11 @@
for d in /etc/opendkim/keys/*
do
- DOMAIN=`basename $d`
+ DOMAIN=$(basename "$d")
- for f in $d/*.private
+ for f in "$d"/*.private
do
- SELECTOR=`basename $f .private`
+ SELECTOR=$(basename "$f" .private)
echo "$DOMAIN $SELECTOR._domainkey.$DOMAIN"
done
done
diff --git a/roles/phabricator/arcanist/files/arc.sh b/roles/phabricator/arcanist/files/arc.sh
--- a/roles/phabricator/arcanist/files/arc.sh
+++ b/roles/phabricator/arcanist/files/arc.sh
@@ -48,7 +48,7 @@
# Enable log printing
PRINT_LOG=1
# Set a random name for the container
- INSTANCE="arc-"`openssl rand -hex 21`
+ INSTANCE="arc-"$(openssl rand -hex 21)
FLAGS="-i -a=stdin --name=$INSTANCE"
fi
fi
@@ -64,10 +64,10 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if [ $PRINT_LOG -eq 0 ]; then
- docker run $FLAGS --rm -v ~/.arc:/opt/config -v $PWD:/opt/workspace $VOLUME_SSH nasqueron/arcanist $COMMAND "$@"
+ docker run "$FLAGS" --rm -v ~/.arc:/opt/config -v "$PWD":/opt/workspace "$VOLUME_SSH" nasqueron/arcanist $COMMAND "$@"
else
- docker run $FLAGS -v ~/.arc:/opt/config -v $PWD:/opt/workspace $VOLUME_SSH nasqueron/arcanist $COMMAND "$@" > /dev/null
+ docker run "$FLAGS" -v ~/.arc:/opt/config -v "$PWD":/opt/workspace "$VOLUME_SSH" nasqueron/arcanist $COMMAND "$@" > /dev/null
sleep 3
- docker logs $INSTANCE
- docker rm $INSTANCE >/dev/null
+ docker logs "$INSTANCE"
+ docker rm "$INSTANCE" >/dev/null
fi
diff --git a/roles/phabricator/containers/files/run-devcentral.sh b/roles/phabricator/containers/files/run-devcentral.sh
--- a/roles/phabricator/containers/files/run-devcentral.sh
+++ b/roles/phabricator/containers/files/run-devcentral.sh
@@ -96,5 +96,5 @@
git checkout $PHABRICATOR_PROD_BRANCH && \
sv restart php-fpm && sv restart phd'
-echo "Deployment done at `date`."
+echo "Deployment done at $(date)."
exit 0
diff --git a/roles/shellserver/user-session/files/whom-diff.sh b/roles/shellserver/user-session/files/whom-diff.sh
--- a/roles/shellserver/user-session/files/whom-diff.sh
+++ b/roles/shellserver/user-session/files/whom-diff.sh
@@ -23,7 +23,7 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if [ "$SESSION_ID" = "" ]; then
- SESSION_ID=`who am I | md5 | cut -c1-8`
+ SESSION_ID=$(who am I | md5 | cut -c1-8)
fi
DIR=/var/tmp/whom/$USER/$SESSION_ID
@@ -34,7 +34,7 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if [ "$1" = "--session" ] || [ "$1" = "-s" ]; then
- echo $SESSION_ID
+ echo "$SESSION_ID"
exit 0
fi
@@ -45,13 +45,13 @@
if [ $# -eq 0 ]; then
# Creates working directory if needed
- if [ ! -d $DIR ]; then
- mkdir -p $DIR
- touch $DIR/old
+ if [ ! -d "$DIR" ]; then
+ mkdir -p "$DIR"
+ touch "$DIR"/old
fi
# Let's diff
- cd $DIR
+ cd "$DIR" || exit
whom > current
diff old current | tail -n +2
mv current old
@@ -65,7 +65,7 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if [ "$1" = "--clean" ] || [ "$1" = "-c" ]; then
- rm -rf $DIR
+ rm -rf "$DIR"
exit $?
fi

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 02:34 (17 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2263783
Default Alt Text
D3422.id8832.diff (4 KB)

Event Timeline