remove unnecessary use of cat (#1616)

This commit is contained in:
Casper 2020-09-23 21:53:07 +02:00 committed by GitHub
parent 566eaa0e13
commit 9f7414d95f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -26,7 +26,7 @@ trap "/usr/bin/fail2ban-client reload" SIGHUP
sleep 5 sleep 5
# wait until fail2ban is dead (triggered by trap) # wait until fail2ban is dead (triggered by trap)
while kill -0 "$(cat /var/run/fail2ban/fail2ban.pid)" while kill -0 "$(< /var/run/fail2ban/fail2ban.pid)"
do do
sleep 5 sleep 5
done done

View file

@ -26,7 +26,7 @@ service postfix start
sleep 5 sleep 5
# wait until postfix is dead (triggered by trap) # wait until postfix is dead (triggered by trap)
while kill -0 "$(cat /var/spool/postfix/pid/master.pid)" while kill -0 "$(< /var/spool/postfix/pid/master.pid)"
do do
sleep 5 sleep 5
done done

View file

@ -351,7 +351,7 @@ function _check_hostname()
if ( ! echo "${HOSTNAME}" | grep -E '^(\S+[.]\S+)$' > /dev/null ) if ( ! echo "${HOSTNAME}" | grep -E '^(\S+[.]\S+)$' > /dev/null )
then then
_notify 'err' "Setting hostname/domainname is required" _notify 'err' "Setting hostname/domainname is required"
kill "$(cat /var/run/supervisord.pid)" && return 1 kill "$(< /var/run/supervisord.pid)" && return 1
else else
return 0 return 0
fi fi
@ -418,7 +418,7 @@ function _setup_default_vars()
if ! echo "export ${var}=\"${DEFAULT_VARS[${var}]}\"" >>/root/.bashrc if ! echo "export ${var}=\"${DEFAULT_VARS[${var}]}\"" >>/root/.bashrc
then then
_notify 'err' "Unable to set ${var}=${DEFAULT_VARS[${var}]}" _notify 'err' "Unable to set ${var}=${DEFAULT_VARS[${var}]}"
kill -15 "$(cat /var/run/supervisord.pid)" kill -15 "$(< /var/run/supervisord.pid)"
return 1 return 1
fi fi
@ -1302,7 +1302,7 @@ function _setup_postfix_virtual_transport()
_notify 'task' 'Setting up Postfix virtual transport' _notify 'task' 'Setting up Postfix virtual transport'
[[ -z ${POSTFIX_DAGENT} ]] && echo "${POSTFIX_DAGENT} not set." && \ [[ -z ${POSTFIX_DAGENT} ]] && echo "${POSTFIX_DAGENT} not set." && \
kill -15 "$(cat /var/run/supervisord.pid)" && return 1 kill -15 "$(< /var/run/supervisord.pid)" && return 1
postconf -e "virtual_transport = ${POSTFIX_DAGENT}" postconf -e "virtual_transport = ${POSTFIX_DAGENT}"
} }