From d0015c876177ab89e07a18802903b74daceab1db Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Wed, 31 Aug 2022 21:51:49 -0600 Subject: [PATCH] remove debugging, checks passed, cleanup --- functions/mount.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/functions/mount.sh b/functions/mount.sh index 5c9c7fab..22665cc0 100644 --- a/functions/mount.sh +++ b/functions/mount.sh @@ -30,9 +30,11 @@ do echo echo "0) Exit" read -rt 120 -p "Please type a number: " selection || { echo -e "\nFailed to make a selection in time" ; exit; } + + #Check for valid selection. If no issues, continue [[ $selection == 0 ]] && echo "Exiting.." && exit app=$(echo -e "$list" | grep ^"$selection)" | awk '{print $2}' | cut -c 4- ) - [[ -z "$app" ]] && echo "Invalid Selection: $selection, was not an option" && sleep 3 && continue #Check for valid selection. If none, contiue + [[ -z "$app" ]] && echo "Invalid Selection: $selection, was not an option" && sleep 3 && continue pvc=$(echo -e "$list" | grep ^"$selection)") #Stop applicaiton if not stopped @@ -43,15 +45,13 @@ do echo "Failed to stop $app" exit 1 else - status=$(cli -m csv -c 'app chart_release query name,status' | grep -E "^$app\b" | awk -F ',' '{print $2}'| tr -d " \t\n\r") - echo "$status" echo "Stopped" fi else echo -e "\n$app is already stopped" fi - #Grab data then output + #Grab data then output and mount data_name=$(echo "$pvc" | awk '{print $3}') volume_name=$(echo "$pvc" | awk '{print $4}') full_path=$(zfs list | grep "$volume_name" | grep "$pool" | awk '{print $1}')