Skip to content

Commit 37ae92f

Browse files
committed
Avoid calling external true/false commands
Trivial fix in bash scripts to avoid calling external true/false commands from the path (like /usr/bin/true or /usr/bin/false) when checking if the `$all_flag` has been set.
1 parent ce7650f commit 37ae92f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

assemble/bin/accumulo-service

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ function stop_service() {
159159
local service_type=$1
160160
local service_name=$2
161161
local all_flag=$3
162-
if $all_flag; then
162+
if [[ $all_flag == 'true' ]]; then
163163
find_processes "$service_type"
164164
for process in "${RUNNING_PROCESSES[@]}"; do
165165
local pid_file="${ACCUMULO_PID_DIR}/accumulo-${process}.pid"
@@ -188,7 +188,7 @@ function kill_service() {
188188
local service_type=$1
189189
local service_name=$2
190190
local all_flag=$3
191-
if $all_flag; then
191+
if [[ $all_flag == 'true' ]]; then
192192
find_processes "$service_type"
193193
for process in "${RUNNING_PROCESSES[@]}"; do
194194
local pid_file="${ACCUMULO_PID_DIR}/accumulo-${process}.pid"

0 commit comments

Comments
 (0)