From 03882029a2dcbe2aa9df402b36788db33ac94b9d Mon Sep 17 00:00:00 2001 From: Lars Wendler Date: Thu, 29 Apr 2021 11:30:44 +0200 Subject: Minor shell style fixes Signed-off-by: Lars Wendler --- 2.4/init/apache2.initd | 12 ++++++------ 2.4/scripts/apache2ctl | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd index fc09ddd..0058e20 100755 --- a/2.4/init/apache2.initd +++ b/2.4/init/apache2.initd @@ -72,12 +72,12 @@ checkconfig() { OUTPUT=$( ${APACHE2} ${APACHE2_OPTS} -t 2>&1 ) ret=$? - if [ $ret -ne 0 ]; then + if [ ${ret} -ne 0 ]; then eerror "${SVCNAME} has detected an error in your setup:" printf "%s\n" "${OUTPUT}" fi - return $ret + return ${ret} } start() { @@ -96,12 +96,12 @@ start() { ${APACHE2} ${APACHE2_OPTS} -k start local i=0 retval=1 - while [ $i -lt ${TIMEOUT} ] ; do + while [ ${i} -lt ${TIMEOUT} ] ; do if [ -e "${PIDFILE}" ] ; then retval=0 break fi - sleep 1 && i=$(expr $i + 1) + sleep 1 && i=$(expr ${i} + 1) done eend ${retval} @@ -123,8 +123,8 @@ stop() { local i=0 retval=0 while ( test -f "${PIDFILE}" || pgrep -P ${PID} apache2 >/dev/null ) \ - && [ $i -lt ${TIMEOUT} ]; do - sleep 1 && i=$(expr $i + 1) + && [ ${i} -lt ${TIMEOUT} ]; do + sleep 1 && i=$(expr ${i} + 1) done [ -e "${PIDFILE}" ] && retval=1 diff --git a/2.4/scripts/apache2ctl b/2.4/scripts/apache2ctl index 872044b..890ded5 100644 --- a/2.4/scripts/apache2ctl +++ b/2.4/scripts/apache2ctl @@ -89,7 +89,7 @@ configdump() { } -if ! is_systemd; then +if ! is_systemd ; then # If systemd IS NOT detected, run the legacy apache2ctl code # If first parameter is a verb defined in $RC_VERBS, pass the command to init script. -- cgit v1.2.3-65-gdbad