-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmenu.sh
executable file
·58 lines (51 loc) · 1.39 KB
/
menu.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
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
# Source the utils.sh file
source ./setup/utils.sh
# Path to the SSH config file
# shellcheck disable=SC2034
sshConfigFile=~/.ssh/config
# shellcheck disable=SC2034
sshKeyDirectory=~/.ssh/ttcp_ssh_key
line="---------------"
# display menu and get user choice for the SSH tools menu options 1-4
function MenuTTCP() {
echo "$line"
echo "|| TTCP MENU ||"
echo "$line"
checkDockerAndDockerCompose
echo "[1] Add Domain"
echo "[2] List Domain"
echo "[3] Remove Domain"
echo "$line"
echo "[4] Add SSH Key"
echo "[5] List SSH Keys"
echo "$line"
echo "[6] List Clone Commands"
echo "[7] Reload Nginx"
echo "[8] Enable Auto-Run on Startup"
echo "[9] Disable Auto-Run on Startup"
echo "$line"
echo "[98] Start TTCP"
echo "[99] Update TTCP"
echo "$line"
echo "[0] Exit / Ctrl+C"
# shellcheck disable=SC2162
read -p "Enter your choice: " choice
case $choice in
1) addDomain ;;
2) listDomains ;;
3) removeDomain ;;
4) addSSHKey ;;
5) listSSHKeys ;;
6) listCloneCommands ;;
7) reloadNginx ;;
8) enableAutoRun ;;
9) disableAutoRun ;;
98) ttcpStartDockerContainer ;;
99) updateTTCP ;;
0) exit 0 ;;
*) echo "Invalid choice. Please try again." && MenuTTCP ;;
esac
}
# run MenuTTCP function to display the SSH tools menu
MenuTTCP