Update dapostinstall.sh
This commit is contained in:
+44
-8
@@ -9,15 +9,59 @@ chmod 600 /usr/local/directadmin/data/users/admin/packages.list
|
||||
echo "NO-LIMIT" > /usr/local/directadmin/data/users/admin/packages.list
|
||||
chown -R diradmin:diradmin /usr/local/directadmin/data/users/admin/packages*
|
||||
tar -xvf skin_customizations.tar -C /usr/local/directadmin/data/users/admin/
|
||||
cd $DAPOSTINSTALL_DIR
|
||||
wget 185.242.134.234/daupdate.sh -O $DAPOSTINSTALL_DIR/daupdate.sh
|
||||
chmod 700 $DAPOSTINSTALL_DIR/daupdate.sh
|
||||
$DAPOSTINSTALL_DIR/daupdate.sh update
|
||||
clear
|
||||
|
||||
read -p "Enter Podaj docelowy port SSH: " SSH_PORT
|
||||
|
||||
echo "Dodatkowe zabezpieczenia SSH"
|
||||
|
||||
while true; do
|
||||
|
||||
read -p "Czy włączyć dodatkowe zabezpieczenia SSH (T/N)? " SECSSH
|
||||
|
||||
case $SECSSH in
|
||||
[Tt] ) echo "Włączam dodatkowe zabezpieczenia SSH"
|
||||
tee -a /etc/ssh/sshd_config > /dev/null <<EOT
|
||||
Match User root Address 185.242.134.0/24,185.242.133.37,185.242.134.92,185.242.134.93,193.177.165.192,193.177.165.193,193.177.165.194,193.177.165.195,193.177.165.196
|
||||
PubkeyAuthentication yes
|
||||
PasswordAuthentication yes
|
||||
PermitRootLogin yes
|
||||
EOT
|
||||
systemctl restart sshd
|
||||
|
||||
break;;
|
||||
[nN] ) echo "Pomijam instalacje dodatkowych zabezpieczeń SSH";
|
||||
break;;
|
||||
* ) echo "Niewlasciwa odpowiedz";;
|
||||
|
||||
read -p "Podaj adres NS1 [dns3.hitme.net.pl]: " NS1_DEFAULT
|
||||
NS1_DEFAULT=${NS1_DEFAULT:-dns3.hitme.net.pl}
|
||||
read -p "Podaj adres NS2 [dns4.hitme.net.pl]: " NS2_DEFAULT
|
||||
NS2_DEFAULT=${NS2_DEFAULT:-dns4.hitme.net.pl}
|
||||
|
||||
echo "Instalacja ModSecurity"
|
||||
|
||||
while true; do
|
||||
|
||||
read -p "Czy włączyć ModSecurity od Malware Expert (T/N)? " MODSEC_ENABLE
|
||||
|
||||
case $MODSEC_ENABLE in
|
||||
[Tt] ) echo "Instaluje ModSecurity"
|
||||
wget 185.242.134.234/hitmemodsec.sh -O /opt/hitmemodsec.sh
|
||||
sh /opt/hitmemodsec.sh
|
||||
rm -f hitmemodsec.sh
|
||||
daupdate antybots
|
||||
break;;
|
||||
[nN] ) echo "Pomijam instalacje ModSecurity";
|
||||
break;;
|
||||
* ) echo "Niewlasciwa odpowiedz";;
|
||||
esac
|
||||
|
||||
done
|
||||
|
||||
echo "Certyfikat SSL dla DirectAdmina"
|
||||
|
||||
@@ -255,15 +299,7 @@ cd /usr/local/directadmin/custombuild
|
||||
echo "Inne optymalizacje"
|
||||
|
||||
cd $DAPOSTINSTALL_DIR
|
||||
wget 185.242.134.234/daupdate.sh -O $DAPOSTINSTALL_DIR/daupdate.sh
|
||||
chmod 700 $DAPOSTINSTALL_DIR/daupdate.sh
|
||||
$DAPOSTINSTALL_DIR/daupdate.sh update
|
||||
daupdate rblda_full
|
||||
daupdate secssh
|
||||
wget 185.242.134.234/hitmemodsec.sh -O /opt/hitmemodsec.sh
|
||||
sh /opt/hitmemodsec.sh
|
||||
rm -f hitmemodsec.sh
|
||||
daupdate antybots
|
||||
cd /opt
|
||||
sh /opt/daupdate bbmysql
|
||||
daupdate klucze
|
||||
|
||||
Reference in New Issue
Block a user