Update dapostinstall.sh
This commit is contained in:
+44
-16
@@ -11,6 +11,12 @@ clear
|
||||
|
||||
|
||||
cd $DAPOSTINSTALL_DIR
|
||||
|
||||
echo "Blokada logowania roota hasłem"
|
||||
sed -i '/PermitRootLogin yes/s/^#//g' /etc/ssh/sshd_config
|
||||
sed -i "s/PermitRootLogin yes/PermitRootLogin without-password/g" /etc/ssh/sshd_config
|
||||
|
||||
|
||||
echo "Tworzenie domyslnego pakietu"
|
||||
mkdir -p /usr/local/directadmin/data/users/admin/packages/
|
||||
mkdir -p /usr/local/directadmin/data/users/admin/packages
|
||||
@@ -52,8 +58,6 @@ cp pl.po login-pl.po /usr/local/directadmin/data/skins/evolution/lang/
|
||||
\cp -f r_welcome.txt /usr/local/directadmin/data/admin
|
||||
\cp -f u_welcome.txt /usr/local/directadmin/data/users/admin
|
||||
\cp -f u_welcome.txt /usr/local/directadmin/data/templates/custom
|
||||
sed -i '/PermitRootLogin yes/s/^#//g' /etc/ssh/sshd_config
|
||||
sed -i "s/PermitRootLogin yes/PermitRootLogin without-password/g" /etc/ssh/sshd_config
|
||||
|
||||
|
||||
|
||||
@@ -133,20 +137,26 @@ echo "Instalacja Modsecurity i regułek malware experts"
|
||||
rm -f hitmemodsec.sh
|
||||
daupdate antybots
|
||||
|
||||
echo "Instaluje branding hitme dla skorki evolution"
|
||||
echo "Instaluje branding hitme dla skorki evolution i serwera www"
|
||||
cd $DAPOSTINSTALL_DIR
|
||||
tar -xvf skin_customizations.tar -C /usr/local/directadmin/data/users/admin/
|
||||
|
||||
echo "Instalacja brandowanych templatek HITME"
|
||||
cd $DAPOSTINSTALL_DIR
|
||||
wget https://cdn.hitme.pl/da_templates.tar
|
||||
tar -xf da_templates.tar
|
||||
cp da_templates/*[1-9]* /home/admin/domains/default/
|
||||
cp da_templates/index.html /home/admin/domains/default/index.html
|
||||
cp da_templates/suspended.shtml /home/admin/domains/suspended/index.html
|
||||
cp cp da_templates/index-hitme.html /var/www/html/index.html
|
||||
cp da_templates/index-hitme.html /var/www/html/index.html
|
||||
cd $DAPOSTINSTALL_DIR
|
||||
|
||||
|
||||
echo "Instalacja Security headers"
|
||||
|
||||
cd $DAPOSTINSTALL_DIR
|
||||
cat security-headers.conf >>/etc/httpd/conf/extra/httpd-includes.conf
|
||||
cd /usr/local/directadmin/custombuild
|
||||
./build rewrite_confs
|
||||
cd $DAPOSTINSTALL_DIR
|
||||
|
||||
echo "Instalacja certyfikatu Let's Encrypt"
|
||||
/usr/local/directadmin/scripts/letsencrypt.sh request_single `hostname` 4096
|
||||
|
||||
@@ -247,12 +257,19 @@ done
|
||||
|
||||
while true; do
|
||||
|
||||
read -p "Czy instalowac brandowanie hitme dla skorki evolution (T/N)? " yn
|
||||
read -p "Czy instalowac brandowanie hitme dla skorki evolution i serwera www (T/N)? " yn
|
||||
|
||||
case $yn in
|
||||
[Tt] ) echo "Instaluje branowanie hitme dla skorki evolution"
|
||||
cd $DAPOSTINSTALL_DIR
|
||||
tar -xvf skin_customizations.tar -C /usr/local/directadmin/data/users/admin/
|
||||
wget https://cdn.hitme.pl/da_templates.tar
|
||||
tar -xf da_templates.tar
|
||||
cp da_templates/*[1-9]* /home/admin/domains/default/
|
||||
cp da_templates/index.html /home/admin/domains/default/index.html
|
||||
cp da_templates/suspended.shtml /home/admin/domains/suspended/index.html
|
||||
cp da_templates/index-hitme.html /var/www/html/index.html
|
||||
cd $DAPOSTINSTALL_DIR
|
||||
break;;
|
||||
[nN] ) echo "Pomijam instalacje brandowania hitme dla skorki evolution";
|
||||
break;;
|
||||
@@ -283,19 +300,16 @@ while true; do
|
||||
read -p "Czy instalowac klucze logowania HITME do SSH (T/N)? " yn
|
||||
|
||||
case $yn in
|
||||
[Tt] ) echo "Czy instalowac brandowane templatki HITME dla stron www?"
|
||||
[Tt] ) echo "Czy instalowac security headers?"
|
||||
cd $DAPOSTINSTALL_DIR
|
||||
wget https://cdn.hitme.pl/da_templates.tar
|
||||
tar -xf da_templates.tar
|
||||
cp da_templates/*[1-9]* /home/admin/domains/default/
|
||||
cp da_templates/index.html /home/admin/domains/default/index.html
|
||||
cp da_templates/suspended.shtml /home/admin/domains/suspended/index.html
|
||||
cp cp da_templates/index-hitme.html /var/www/html/index.html
|
||||
cat security-headers.conf >>/etc/httpd/conf/extra/httpd-includes.conf
|
||||
cd /usr/local/directadmin/custombuild
|
||||
./build rewrite_confs
|
||||
cd $DAPOSTINSTALL_DIR
|
||||
|
||||
|
||||
break;;
|
||||
[nN] ) echo "Pomijam instalacje brandowanych templatek";
|
||||
[nN] ) echo "Pomijam instalacje security headers";
|
||||
break;;
|
||||
* ) echo "Niewlasciwa odpowiedz";;
|
||||
esac
|
||||
@@ -452,6 +466,20 @@ cd /usr/local/directadmin/custombuild
|
||||
./build set http_methods ALL
|
||||
./build rewrite_confs
|
||||
|
||||
echo "Instalacja composera"
|
||||
cd /usr/local/directadmin/custombuild
|
||||
./build composer
|
||||
cd $DAPOSTINSTALL_DIR
|
||||
|
||||
echo "Instalacja wp-cli"
|
||||
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
|
||||
chmod +x wp-cli.phar
|
||||
mv wp-cli.phar /usr/local/bin/wp
|
||||
cd $DAPOSTINSTALL_DIR
|
||||
|
||||
echo "Instalacja IMAPsync"
|
||||
dnf -y install --enablerepo=powertools imapsync
|
||||
|
||||
echo "Inne optymalizacje"
|
||||
|
||||
cd $DAPOSTINSTALL_DIR
|
||||
|
||||
Reference in New Issue
Block a user