Skip to content

Commit

Permalink
Cleanup error messages in run scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtSilvio committed Apr 29, 2024
1 parent 37d3ae4 commit 1b6c621
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/distribution/bin/diagnostics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fi
JAVA_VERSION=$(java -version 2>&1 | awk -F '"' '/version/ {print $2}' | sed 's/\..*//')

if [ "$JAVA_VERSION" -lt 11 ]; then
echo 'HiveMQ requires at least Java version 11' >&2
echo 'ERROR! HiveMQ requires at least Java version 11.' >&2
exit 1
fi

Expand Down Expand Up @@ -70,12 +70,12 @@ fi
HOME_OPT="-Dhivemq.home=$HIVEMQ_HOME"

if [ ! -d "$HIVEMQ_HOME" ]; then
echo 'ERROR! HiveMQ Home Folder not found.' >&2
echo 'ERROR! HiveMQ home folder not found.' >&2
exit 1
fi

if [ ! -w "$HIVEMQ_HOME" ]; then
echo 'ERROR! HiveMQ Home Folder Permissions not correct.' >&2
echo 'ERROR! HiveMQ home folder permissions not correct.' >&2
exit 1
fi

Expand Down
6 changes: 3 additions & 3 deletions src/distribution/bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fi
JAVA_VERSION=$(java -version 2>&1 | awk -F '"' '/version/ {print $2}' | sed 's/\..*//')

if [ "$JAVA_VERSION" -lt 11 ]; then
echo 'HiveMQ requires at least Java version 11' >&2
echo 'ERROR! HiveMQ requires at least Java version 11.' >&2
exit 1
fi

Expand Down Expand Up @@ -69,12 +69,12 @@ fi
HOME_OPT="-Dhivemq.home=$HIVEMQ_HOME"

if [ ! -d "$HIVEMQ_HOME" ]; then
echo 'ERROR! HiveMQ Home Folder not found.' >&2
echo 'ERROR! HiveMQ home folder not found.' >&2
exit 1
fi

if [ ! -w "$HIVEMQ_HOME" ]; then
echo 'ERROR! HiveMQ Home Folder Permissions not correct.' >&2
echo 'ERROR! HiveMQ home folder permissions not correct.' >&2
exit 1
fi

Expand Down

0 comments on commit 1b6c621

Please sign in to comment.