forked from syapik96/aws
-
Notifications
You must be signed in to change notification settings - Fork 0
/
restart1.sh
203 lines (201 loc) · 9.17 KB
/
restart1.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
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
#!/bin/bash
# Mod by ALK
red='\e[1;31m'
green='\e[0;32m'
NC='\e[0m'
bl='\e[36;1m'
bd='\e[1m'
clear
figlet -f slant "Restart Services" | lolcat
echo -e ""
echo -e " ╔════════════════════════════════════════════════════════════╗" | lolcat
echo -e " ║ ♠ Restart All Services ♠ ║" | lolcat
echo -e " ╚════════════════════════════════════════════════════════════╝" | lolcat
echo -e ""
echo -e " $bl[\e[m$bd 1$bl]\e[m$bd Restart All Services"
echo -e " $bl[\e[m$bd 2$bl]\e[m$bd Restart OpenSSH"
echo -e " $bl[\e[m$bd 3$bl]\e[m$bd Restart Dropbear"
echo -e " $bl[\e[m$bd 4$bl]\e[m$bd Restart Stunnel4"
echo -e " $bl[\e[m$bd 5$bl]\e[m$bd Restart OpenVPN"
echo -e " $bl[\e[m$bd 6$bl]\e[m$bd Restart Squid"
echo -e " $bl[\e[m$bd 7$bl]\e[m$bd Restart Nginx"
echo -e " $bl[\e[m$bd 8$bl]\e[m$bd Restart Badvpn"
echo -e " $bl[\e[m$bd 9$bl]\e[m$bd Restart Websocket Python"
echo -e " $bl[\e[m$bd x$bl]\e[m$bd Exit"
echo -e ""
echo -e " ╔════════════════════════════════════════════════════════════╗" | lolcat
echo -e " ║ Copyright © 2024 by Github.com/alkhanet26 ║" | lolcat
echo -e " ║ 🔰Auto-Script is Powered by ALK.🔰 ║" | lolcat
echo -e " ╚════════════════════════════════════════════════════════════╝" | lolcat
echo -e ""
read -p " Select From Options [1-9 or x] : " Restart
clear
case $Restart in
1)
clear
/etc/init.d/ssh restart
/etc/init.d/dropbear restart
/etc/init.d/stunnel4 restart
/etc/init.d/openvpn restart
/etc/init.d/fail2ban restart
/etc/init.d/webmin restart
/etc/init.d/cron restart
/etc/init.d/nginx restart
/etc/init.d/squid restart
systemctl daemon-reload
systemctl enable ws-openssh.service
systemctl start ws-openssh.service
systemctl restart ws-openssh.service
systemctl enable ws-dropbear.service
systemctl start ws-dropbear.service
systemctl restart ws-dropbear.service
systemctl enable ws-stunnel.service
systemctl start ws-stunnel.service
systemctl restart ws-stunnel.service
systemctl enable ws-ovpn.service
systemctl start ws-ovpn.service
systemctl restart ws-ovpn.service
/etc/init.d/sshd restart
screen -dmS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7100 --max-clients 500
screen -dmS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7200 --max-clients 500
screen -dmS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7300 --max-clients 500
echo -e ""
echo -e "======================================"| lolcat
echo -e ""
echo -e " Script Mod by ALK "
echo -e ""
echo -e " All Service Restarted "
echo -e ""
echo -e "======================================"| lolcat
exit
;;
2)
clear
/etc/init.d/ssh restart
/etc/init.d/sshd restart
echo -e ""
echo -e "======================================"| lolcat
echo -e ""
echo -e " Script Mod by ALK "
echo -e ""
echo -e " SSH Service Restarted "
echo -e ""
echo -e "======================================"| lolcat
exit
;;
3)
clear
/etc/init.d/dropbear restart
echo -e ""
echo -e "======================================"| lolcat
echo -e ""
echo -e " Script Mod by ALK "
echo -e ""
echo -e " Dropbear Service Restarted "
echo -e ""
echo -e "======================================"| lolcat
exit
;;
4)
clear
/etc/init.d/stunnel4 restart
echo -e ""
echo -e "======================================"| lolcat
echo -e ""
echo -e " Script Mod by ALK "
echo -e ""
echo -e " Stunnel4 Service Restarted "
echo -e ""
echo -e "======================================"| lolcat
exit
;;
5)
clear
/etc/init.d/openvpn restart
echo -e ""
echo -e "======================================"| lolcat
echo -e ""
echo -e " Script Mod by ALK "
echo -e ""
echo -e " OpenVPN Service Restarted "
echo -e ""
echo -e "======================================"| lolcat
exit
;;
6)
clear
/etc/init.d/squid restart
echo -e ""
echo -e "======================================"| lolcat
echo -e ""
echo -e " Script Mod by ALK "
echo -e ""
echo -e " Squid Service Restarted "
echo -e ""
echo -e "======================================"| lolcat
exit
;;
7)
clear
/etc/init.d/nginx restart
echo -e ""
echo -e "======================================"| lolcat
echo -e ""
echo -e " Script Mod by ALK "
echo -e ""
echo -e " Nginx Service Restarted "
echo -e ""
echo -e "======================================"| lolcat
exit
;;
8)
clear
screen -dmS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7100 --max-clients 500
screen -dmS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7200 --max-clients 500
screen -dmS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7300 --max-clients 500
screen -dmS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7400 --max-clients 500
screen -dmS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7500 --max-clients 500
screen -dmS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7600 --max-clients 500
screen -dmS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7700 --max-clients 500
screen -dmS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7800 --max-clients 500
screen -dmS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7900 --max-clients 500
echo -e ""
echo -e "======================================"| lolcat
echo -e ""
echo -e " Script Mod by ALK "
echo -e ""
echo -e " Badvpn Badvpn Service Restarted "
echo -e ""
echo -e "======================================"| lolcat
exit
;;
9)
clear
systemctl daemon-reload
systemctl enable ws-openssh.service
systemctl start ws-openssh.service
systemctl restart ws-openssh.service
systemctl enable ws-dropbear.service
systemctl start ws-dropbear.service
systemctl restart ws-dropbear.service
systemctl enable ws-stunnel.service
systemctl start ws-stunnel.service
systemctl restart ws-stunnel.service
systemctl enable ws-ovpn.service
systemctl start ws-ovpn.service
systemctl restart ws-ovpn.service
echo -e ""
echo -e "======================================"| lolcat
echo -e ""
echo -e " Script Mod by ALK "
echo -e ""
echo -e " WS Python Service Restarted "
echo -e ""
echo -e "======================================"| lolcat
exit
;;
x)
clear
exit
;;
esac