Update dapostinstall.sh
This commit is contained in:
+43
-15
@@ -11,6 +11,12 @@ clear
|
|||||||
|
|
||||||
|
|
||||||
cd $DAPOSTINSTALL_DIR
|
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"
|
echo "Tworzenie domyslnego pakietu"
|
||||||
mkdir -p /usr/local/directadmin/data/users/admin/packages/
|
mkdir -p /usr/local/directadmin/data/users/admin/packages/
|
||||||
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 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/users/admin
|
||||||
\cp -f u_welcome.txt /usr/local/directadmin/data/templates/custom
|
\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,18 +137,24 @@ echo "Instalacja Modsecurity i regułek malware experts"
|
|||||||
rm -f hitmemodsec.sh
|
rm -f hitmemodsec.sh
|
||||||
daupdate antybots
|
daupdate antybots
|
||||||
|
|
||||||
echo "Instaluje branding hitme dla skorki evolution"
|
echo "Instaluje branding hitme dla skorki evolution i serwera www"
|
||||||
cd $DAPOSTINSTALL_DIR
|
cd $DAPOSTINSTALL_DIR
|
||||||
tar -xvf skin_customizations.tar -C /usr/local/directadmin/data/users/admin/
|
tar -xvf skin_customizations.tar -C /usr/local/directadmin/data/users/admin/
|
||||||
|
|
||||||
echo "Instalacja brandowanych templatek HITME"
|
|
||||||
cd $DAPOSTINSTALL_DIR
|
cd $DAPOSTINSTALL_DIR
|
||||||
wget https://cdn.hitme.pl/da_templates.tar
|
wget https://cdn.hitme.pl/da_templates.tar
|
||||||
tar -xf da_templates.tar
|
tar -xf da_templates.tar
|
||||||
cp da_templates/*[1-9]* /home/admin/domains/default/
|
cp da_templates/*[1-9]* /home/admin/domains/default/
|
||||||
cp da_templates/index.html /home/admin/domains/default/index.html
|
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/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
|
cd $DAPOSTINSTALL_DIR
|
||||||
|
|
||||||
echo "Instalacja certyfikatu Let's Encrypt"
|
echo "Instalacja certyfikatu Let's Encrypt"
|
||||||
@@ -247,12 +257,19 @@ done
|
|||||||
|
|
||||||
while true; do
|
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
|
case $yn in
|
||||||
[Tt] ) echo "Instaluje branowanie hitme dla skorki evolution"
|
[Tt] ) echo "Instaluje branowanie hitme dla skorki evolution"
|
||||||
cd $DAPOSTINSTALL_DIR
|
cd $DAPOSTINSTALL_DIR
|
||||||
tar -xvf skin_customizations.tar -C /usr/local/directadmin/data/users/admin/
|
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;;
|
break;;
|
||||||
[nN] ) echo "Pomijam instalacje brandowania hitme dla skorki evolution";
|
[nN] ) echo "Pomijam instalacje brandowania hitme dla skorki evolution";
|
||||||
break;;
|
break;;
|
||||||
@@ -283,19 +300,16 @@ while true; do
|
|||||||
read -p "Czy instalowac klucze logowania HITME do SSH (T/N)? " yn
|
read -p "Czy instalowac klucze logowania HITME do SSH (T/N)? " yn
|
||||||
|
|
||||||
case $yn in
|
case $yn in
|
||||||
[Tt] ) echo "Czy instalowac brandowane templatki HITME dla stron www?"
|
[Tt] ) echo "Czy instalowac security headers?"
|
||||||
cd $DAPOSTINSTALL_DIR
|
cd $DAPOSTINSTALL_DIR
|
||||||
wget https://cdn.hitme.pl/da_templates.tar
|
cat security-headers.conf >>/etc/httpd/conf/extra/httpd-includes.conf
|
||||||
tar -xf da_templates.tar
|
cd /usr/local/directadmin/custombuild
|
||||||
cp da_templates/*[1-9]* /home/admin/domains/default/
|
./build rewrite_confs
|
||||||
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
|
|
||||||
cd $DAPOSTINSTALL_DIR
|
cd $DAPOSTINSTALL_DIR
|
||||||
|
|
||||||
|
|
||||||
break;;
|
break;;
|
||||||
[nN] ) echo "Pomijam instalacje brandowanych templatek";
|
[nN] ) echo "Pomijam instalacje security headers";
|
||||||
break;;
|
break;;
|
||||||
* ) echo "Niewlasciwa odpowiedz";;
|
* ) echo "Niewlasciwa odpowiedz";;
|
||||||
esac
|
esac
|
||||||
@@ -452,6 +466,20 @@ cd /usr/local/directadmin/custombuild
|
|||||||
./build set http_methods ALL
|
./build set http_methods ALL
|
||||||
./build rewrite_confs
|
./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"
|
echo "Inne optymalizacje"
|
||||||
|
|
||||||
cd $DAPOSTINSTALL_DIR
|
cd $DAPOSTINSTALL_DIR
|
||||||
|
|||||||
Reference in New Issue
Block a user