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