Use local branding archives

This commit is contained in:
Marek Miklewicz
2026-06-13 19:07:09 +02:00
parent fee4de3e2b
commit f880333fe5
4 changed files with 47 additions and 11 deletions
+17 -11
View File
@@ -15,6 +15,9 @@ HTLINK="https://ht.zenadmin.pl"
DEFAULT_NS1=dns3.hitme.net.pl
DEFAULT_NS2=dns4.hitme.net.pl
SETUP_TXT="$DADIR/conf/setup.txt"
BRANDING_DIR="$DAPOSTINSTALL_DIR/branding"
DA_TEMPLATES_ARCHIVE="$BRANDING_DIR/da_templates.tar"
DA_BRANDING_ARCHIVE="$BRANDING_DIR/da-branding-hitme.tar.gz"
# PHP versions and extensions managed through DirectAdmin CustomBuild.
php1_release=8.3
@@ -81,6 +84,8 @@ require_dir "$DADIR"
require_dir "$CBDIR"
require_file "$CBDIR/build"
require_file "$SETUP_TXT"
require_file "$DA_TEMPLATES_ARCHIVE"
require_file "$DA_BRANDING_ARCHIVE"
yum -y install epel-release
yum -y install htop wget rsync nano mc ncdu borgbackup screen net-tools htop libmemcached libmemcached-devel
cp daupdate.sh /opt
@@ -190,22 +195,23 @@ echo "Instalacja Modsecurity i regułek malware experts"
daupdate antybots
echo "Instaluje branding hitme dla skorki evolution i serwera www"
templates_tmp="$(mktemp -d)"
trap 'rm -rf "$templates_tmp"' EXIT
cd $DAPOSTINSTALL_DIR
tar -xvf skin_customizations.tar -C $DADIR/data/users/admin/
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 da_templates/index-hitme.html /var/www/html/index.html
tar -xf "$DA_TEMPLATES_ARCHIVE" -C "$templates_tmp"
cp "$templates_tmp"/da_templates/*[1-9]* /home/admin/domains/default/
cp "$templates_tmp"/da_templates/index.html /home/admin/domains/default/index.html
cp "$templates_tmp"/da_templates/suspended.shtml /home/admin/domains/suspended/index.html
if [[ -f "$templates_tmp"/da_templates/index-hitme.html ]]; then
cp "$templates_tmp"/da_templates/index-hitme.html /var/www/html/index.html
else
cp "$templates_tmp"/da_templates/index.html /var/www/html/index.html
fi
cd $DAPOSTINSTALL_DIR
echo "Login branging hitme"
cd /
wget https://cdn.hitme.pl/da_files/da-branding-hitme.tar.gz
tar xvzf da-branding-hitme.tar.gz
rm -rf da-branding-hitme.tar.gz
tar -xzf "$DA_BRANDING_ARCHIVE" -C /
cd $DAPOSTINSTALL_DIR/login_branding
cp admin/* $DADIR/data/admin/
cp -rfp users/admin/skin_customizations//evolution/* $DADIR/data/users/admin/skin_customizations/evolution