forked from irwanmohi/AutoScriptSSH
-
Notifications
You must be signed in to change notification settings - Fork 1
/
editsm
69 lines (67 loc) · 1.19 KB
/
editsm
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
#!/bin/bash
# Created by http://www.embex.online
# Remodified by Embex
if [[ $USER != 'root' ]]; then
echo "Oops! root privileges needed"
exit
fi
while :
do
clear
echo " "
echo " "
echo "-----------------------------------------"
echo " Edit Server Message "
echo "-----------------------------------------"
echo "In order to work this changing server message"
echo "A reboot is required to do"
echo " "
echo " [ MENU ]"
echo "1. Edit Server Message"
echo "2. Reboot Now"
echo "3. Go Back"
read -p "Select from 1 to 3 : " option2
case $option2 in
1)
nano /etc/issue.net
;;
2)
cd
clear
echo "YOUR SERVER IS NOW REFRESHING "
echo "DON'T TOUCH ANYTHING!!!"
service nginx start
service php7.0-fpm start
service vnstat restart
service openvpn restart
service dropbear restart
service fail2ban restart
service squid restart
echo "."
echo "."
echo "."
echo "."
echo "."
echo "."
echo "."
echo "."
echo "."
echo "."
echo "."
echo "."
echo "."
echo "."
echo "."
echo "."
echo "All services were refreshed successfully!"
echo "NOW REBOOTING, PLEASE WAIT..."
sleep 5
reboot
;;
3)
clear
exit
;;
esac
done
cd