Improve panel

This commit is contained in:
Skylar Grant 2024-11-24 19:20:44 -05:00
parent 225d464ad6
commit bccbe3dad6

44
src/_EMR/panel.sh Normal file → Executable file
View File

@ -4,29 +4,34 @@
ROOT_PATH="/srv/hestia" ROOT_PATH="/srv/hestia"
EMR_FOLDER="src/_EMR" EMR_FOLDER="src/_EMR"
# Prompt for input
echo "##########################################"
echo "# Hestia Emergency Control Panel #"
echo "##########################################"
echo "# 1. Exhaust ON #"
echo "# 2. Exhaust OFF #"
echo "# 3. Igniter ON #"
echo "# 4. Igniter OFF #"
echo "# 5. Start Auger Loop #"
echo "# 6. Stop Auger Loop #"
echo "##########################################"
echo "# 0. Exit #"
echo "##########################################"
# Read user input # Loop
read -p "Menu Option: " choice while true; do
# Prompt for input
echo "##########################################"
echo "# Hestia Emergency Control Panel #"
echo "##########################################"
echo "# 1. Exhaust ON #"
echo "# 2. Exhaust OFF #"
echo "# 3. Igniter ON #"
echo "# 4. Igniter OFF #"
echo "# 5. Start Auger Loop #"
echo "# 6. Stop Auger Loop #"
echo "##########################################"
echo "# 0. Exit #"
echo "##########################################"
# Switch case on input # Read user input
case $choice in read -p "Menu Option: " choice
# Switch case on input
case $choice in
1) 1)
echo "Turning Exhaust ON" echo "Turning Exhaust ON"
cd $ROOT_PATH cd $ROOT_PATH
node $EMR_FOLDER/exh_on.js node $EMR_FOLDER/exh_on.js
# Return to the prompt
;; ;;
2) 2)
echo "Turning Exhaust OFF" echo "Turning Exhaust OFF"
@ -55,8 +60,11 @@ case $choice in
;; ;;
0) 0)
echo "Exiting" echo "Exiting"
exit
break
;; ;;
*) *)
echo "Invalid input" echo "Invalid input"
;; ;;
esac esac
done