Fix Error check and error message style
This commit is contained in:
parent
8c4f1ce531
commit
000a7a2701
@ -3092,9 +3092,8 @@ check_container_resources() {
|
|||||||
check_container_storage() {
|
check_container_storage() {
|
||||||
usage=$(df / -P | awk 'NR==2 {print $5}' | tr -d '%')
|
usage=$(df / -P | awk 'NR==2 {print $5}' | tr -d '%')
|
||||||
|
|
||||||
# shellcheck disable=SC2181
|
if [ -z "$usage" ] || [ "$usage" -lt 0 ]; then
|
||||||
if [ $? -ne 0 ]; then
|
echo -e "${CROSS}${HOLD}${RD}Error: Failed to check disk usage.${CL}"
|
||||||
echo "Error: Failed to check disk usage."
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -3104,9 +3103,7 @@ check_container_storage() {
|
|||||||
read -r prompt
|
read -r prompt
|
||||||
|
|
||||||
case "$prompt" in
|
case "$prompt" in
|
||||||
[yY][eE][sS] | [yY])
|
[yY][eE][sS] | [yY]) ;;
|
||||||
# User input is "yes" or "y"; continue
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
echo -e "${CROSS}${HOLD}${YWB}Exiting based on user input.${CL}"
|
echo -e "${CROSS}${HOLD}${YWB}Exiting based on user input.${CL}"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user