Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix shellcheck issues #495

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion github-dev/cleanup-pr-branch
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e
set -o pipefail

if [[ ! -z "$TOKEN" ]]; then
if [[ -n "$TOKEN" ]]; then
GITHUB_TOKEN=$TOKEN
fi

Expand Down
2 changes: 1 addition & 1 deletion github-dev/release-email-notification
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [[ -z "$MAILGUN_API_KEY" ]]; then
exit 1
fi

if [[ ! -z "$MAILGUN_DOMAIN" ]]; then
if [[ -n "$MAILGUN_DOMAIN" ]]; then
MAILGUN_DOMAIN_NAME=$MAILGUN_DOMAIN
fi

Expand Down
2 changes: 1 addition & 1 deletion github-dev/upload-assets
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

if [[ ! -z "$TOKEN" ]]; then
if [[ -n "$TOKEN" ]]; then
GITHUB_TOKEN=$TOKEN
fi

Expand Down
2 changes: 1 addition & 1 deletion mailgun/sendemail
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [[ -z "$MAILGUN_API_KEY" ]]; then
exit 1
fi

if [[ ! -z "$MAILGUN_DOMAIN" ]]; then
if [[ -n "$MAILGUN_DOMAIN" ]]; then
MAILGUN_DOMAIN_NAME=$MAILGUN_DOMAIN
fi

Expand Down
2 changes: 1 addition & 1 deletion mutt/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if [ -d "$HOME/.gnupg" ]; then
if [ -f "/usr/share/doc/mutt/examples/gpg.rc" ]; then
echo 'source /usr/share/doc/mutt/examples/gpg.rc'
fi
if [ ! -z "$GPG_ID" ]; then
if [ -n "$GPG_ID" ]; then
echo "set pgp_sign_as = $GPG_ID"
fi
echo 'set crypt_replysign=yes'
Expand Down
14 changes: 7 additions & 7 deletions postfix/service/postfix/run
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ EOF
# shellcheck disable=SC1091
[ -f /etc/service/postfix/run.config ] && source /etc/service/postfix/run.config

if [[ ! -z "$MAILNAME" ]]; then
if [[ -n "$MAILNAME" ]]; then
echo "$MAILNAME" > /etc/mailname
postconf -e myorigin="/etc/mailname"

Expand All @@ -25,23 +25,23 @@ if [[ ! -z "$MAILNAME" ]]; then
EOF
fi

if [[ ! -z "$MY_NETWORKS" ]]; then
if [[ -n "$MY_NETWORKS" ]]; then
postconf -e mynetworks="$MY_NETWORKS"
fi

if [[ ! -z "$MY_DESTINATION" ]]; then
if [[ -n "$MY_DESTINATION" ]]; then
postconf -e mydestination="$MY_DESTINATION"
fi

if [[ ! -z "$ROOT_ALIAS" ]]; then
if [[ -n "$ROOT_ALIAS" ]]; then
if [[ -f /etc/aliases ]]; then
sed -i '/^root:/d' /etc/aliases
fi
echo "root: $ROOT_ALIAS" >> /etc/aliases
newaliases
fi

if [[ ! -z "$RELAY" ]]; then
if [[ -n "$RELAY" ]]; then
# setup the relay
cat >> /etc/postfix/main.cf <<- EOF
relayhost = $RELAY
Expand All @@ -52,15 +52,15 @@ if [[ ! -z "$RELAY" ]]; then
EOF
fi

if [[ ! -z "$TLS" ]]; then
if [[ -n "$TLS" ]]; then
# setup tls
cat >> /etc/postfix/main.cf <<- EOF
smtp_use_tls = yes
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
EOF
fi

if [[ ! -z "$SASL_AUTH" ]]; then
if [[ -n "$SASL_AUTH" ]]; then
cat >> /etc/postfix/main.cf <<- EOF
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
Expand Down