-
Notifications
You must be signed in to change notification settings - Fork 0
/
terminal.sh
45 lines (38 loc) · 1.74 KB
/
terminal.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
clear
cat<<'EOF'
██╗ ██╗████████╗ ████████╗███████╗██████╗ ███╗ ███╗
██║ ██║╚══██╔══╝ ╚══██╔══╝██╔════╝██╔══██╗████╗ ████║
██║ ██║ ██║ ██║ █████╗ ██████╔╝██╔████╔██║
╚██╗ ██╔╝ ██║ ██║ ██╔══╝ ██╔══██╗██║╚██╔╝██║
╚████╔╝ ██║ ██║ ███████╗██║ ██║██║ ╚═╝ ██║
╚═══╝ ╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝
EOF
PS3="START TERMINAL - CHOOSE TERM OPTION: "
select term in 115200 9600 2400 APC-UPS Exit
do
case $term in
"115200")
echo "Starting minicom at 115200 baud"
minicom -c on -b 115200 -o -D /dev/ttyUSB0
exec $0;;
"9600")
echo "Starting minicom at 9600 baud"
minicom -c on -b 9600 -o -D /dev/ttyUSB0
exec $0;;
"2400")
echo "Starting minicom at 2400 baud"
minicom -c on -b 2400 -o -D /dev/ttyUSB0
exec $0;;
"APC-UPS")
echo "Starting minicom for APC USB cable"
minicom -c on -b 115200 -o -D /dev/ttyUSB0
exec $0;;
"Exit")
echo "Exiting to shell"
break;;
*)
echo "Unknown option"
exec $0;;
esac
done