-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSysctl-installer.sh
28 lines (28 loc) · 1.04 KB
/
Sysctl-installer.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
#!/bin/bash
##
hijau=$(tput setaf 2)
echo "${hijau}######################################"
echo "${hijau} Please run this scripts on SU"
echo "${hijau}######################################"
echo "${hijau}Working....."
echo "${hijau}######################################"
curl -o /opt/sysctl.conf https://raw.githubusercontent.com/Adepurnomo/Sysctl/master/sysctl.conf
mv /etc/sysctl.conf /etc/sysctl.conf-original > /dev/null 2>&1
\cp /opt/sysctl.conf /etc/ > /dev/null 2>&1
/bin/chmod a+x /etc/sysctl.conf
rm -rf /opt/* > /dev/null 2>&1
sleep 3
sysctl -p
sleep 3
echo "${hijau}######################################"
echo "${hijau} Checking tuned-adm"
echo "${hijau}######################################"
echo "${hijau} for rhel 6 ignore error"
/bin/systemctl status tuned.service
/bin/systemctl restart tuned.service
/bin/systemctl enable tuned.service
tuned-adm list
tuned-adm active
echo "${hijau}######################################"
echo "${hijau} Done, Please restart your server"
echo "${hijau}######################################"