Normalizing quote usage in initd

pull/2348/head
Viktor Szépe 2019-02-15 21:56:34 +01:00
parent c545315192
commit 24b0e048d1
1 changed files with 11 additions and 11 deletions

View File

@ -104,7 +104,7 @@ do_start()
if [ -e "$SOCKFILE" ]; then
log_failure_msg "Socket file $SOCKFILE is present"
[ "$1" = "force-start" ] \
[ "$1" = force-start ] \
&& log_success_msg "Starting anyway as requested" \
|| return 2
DAEMON_ARGS="$DAEMON_ARGS -x"
@ -113,7 +113,7 @@ do_start()
# Assure that /var/run/fail2ban exists
[ -d /var/run/fail2ban ] || mkdir -p /var/run/fail2ban
if [ "$FAIL2BAN_USER" != "root" ]; then
if [ "$FAIL2BAN_USER" != root ]; then
# Make the socket directory, IP lists and fail2ban log
# files writable by fail2ban
chown "$FAIL2BAN_USER" /var/run/fail2ban
@ -184,16 +184,16 @@ do_reload()
#
log_end_msg_wrapper()
{
if [ $1 != 0 ] && [ $1 != $2 ]; then
value=1
if [ "$1" != 0 ] && [ "$1" != "$2" ]; then
value="1"
else
value=0
value="0"
fi
if [ "$3" != "no" ]; then
if [ "$3" != no ]; then
log_end_msg "$value"
fi
if [ $value != "0" ]; then
exit $1
if [ "$value" != 0 ]; then
exit "$1"
fi
}
@ -229,19 +229,19 @@ case "$command" in
reload)
log_daemon_msg "Reloading $DESC" "$NAME"
do_reload
log_end_msg $?
log_end_msg "$?"
;;
status)
log_daemon_msg "Status of $DESC"
do_status
case $? in
case "$?" in
0)
log_success_msg " $NAME is running"
;;
255)
check_socket
case $? in
case "$?" in
1)
log_failure_msg " $NAME is not running" && exit 3
;;