-
Notifications
You must be signed in to change notification settings - Fork 2
/
SwissAdminTool
128 lines (110 loc) · 3.28 KB
/
SwissAdminTool
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#!/bin/bash
#
#
#
#
#
chmod +x install.sh &> /dev/null
chmod +x backup_server &> /dev/null
chmod +x dhcp_server &> /dev/null
chmod +x dns_server &> /dev/null
chmod +x ftp_server &> /dev/null
chmod +x mysql_server &> /dev/null
chmod +x no_static_ip &> /dev/null
chmod +x server_config &> /dev/null
chmod +x ssh_server &> /dev/null
chmod +x static_ip &> /dev/null
chmod +x ufw_server &> /dev/null
chmod +x vpn_server &> /dev/null
trap closeit SIGINT
function closeit(){
echo "$(tput setaf 8)Ctrl_C detectado..."
echo " "
echo "$(tput setaf 4)Saliendo "
echo " "
echo -n "." && sleep 0.5 && echo -n "." && sleep 0.5 && echo -n "." && sleep 0.5 && echo -n "." && sleep 0.5 && echo -n "." && sleep 0.5 && echo -n "." && sleep 0.5
echo " "
echo "$(tput setaf 6)Éxito."
tput sgr0
exit
}
ls -l /usr/bin/figlet &> /dev/null
if [[ $? == 2 ]] ; then
echo " "
echo "$(tput setaf 6)[$(tput setaf 1)*$(tput setaf 6)]$(tput setaf 2)Instalando figlet, no detectado ... "
apt install figlet -y &> /dev/null
echo " "
fi
echo "$(tput setaf 3)" && figlet SwissAdminTool 2> /dev/null
echo " "
echo "$(tput setaf 4) Versión $(tput setaf 8)1.0 para $(tput setaf 3)Administradores de Servidores y Sistemas."
echo " "
echo "$(tput setaf 5 ) _________________________________________________________________________"
echo " "
echo "$(tput setaf 4) Instagram $(tput setaf 1)--> $(tput setaf 8)@ShadowVMX "
echo " "
echo "$(tput setaf 4) LinkedIn $(tput setaf 1)--> $(tput setaf 8)https://www.linkedin.com/in/juanma-coello-romero-757280226/"
echo " "
echo "$(tput setaf 4) GitHub $(tput setaf 1)--> $(tput setaf 8)https://github.com/ShadowVMX"
echo " "
echo "$(tput setaf 5 ) _________________________________________________________________________"
echo " "
echo "$(tput setaf 2)[OPCIONES DE EJECUCIÓN Y/O INSTALACIÓN]:"
echo " "
echo -n "$(tput setaf 3)[1.] $(tput setaf 4) Instalar. [Rec]" && echo " $(tput setaf 3)[7.] $(tput setaf 4) IP Estática."
echo " "
echo -n "$(tput setaf 3)[2.] $(tput setaf 4) DNS." && echo " $(tput setaf 3)[8.] $(tput setaf 4) SSH."
echo " "
echo -n "$(tput setaf 3)[3.] $(tput setaf 4) BackUp." && echo " $(tput setaf 3)[9.] $(tput setaf 4) IP Dinámica."
echo " "
echo -n "$(tput setaf 3)[4.] $(tput setaf 4) FTP." && echo " $(tput setaf 3)[10.] $(tput setaf 4) UFW."
echo " "
echo -n "$(tput setaf 3)[5.] $(tput setaf 4) DHCP." && echo " $(tput setaf 3)[11.] $(tput setaf 4) VPN."
echo " "
echo -n "$(tput setaf 3)[6.] $(tput setaf 4) Server Config." && echo " $(tput setaf 3)[12.] $(tput setaf 4) MySQL."
echo " "
echo " "
sleep 1.5
read -p "$(tput setaf 8)¿Qué desea realizar? $(tput setaf 1)--> $(tput setaf 4)" answer
case $answer in
1)
./install.sh
;;
2)
./dns_server
;;
3)
./backup_server
;;
4)
./ftp_server
;;
5)
./dhcp_server
;;
6)
./server_config
;;
7)
./static_ip
;;
8)
./ssh_server
;;
9)
./no_static_ip
;;
10)
./ufw_server
;;
11)
./vpn_server
;;
12)
./mysql__server
;;
*)
echo "$(tput setaf 1)[*] $(tput setaf 4)Opción no válida."
;;
esac
tput sgr0