From a75d061abaa1957f0fa75af75ac01366c7754e3d Mon Sep 17 00:00:00 2001 From: tuend-work <121396415+tuend-work@users.noreply.github.com> Date: Thu, 13 Nov 2025 13:34:21 +0700 Subject: [PATCH] ud --- conf/directadmin.conf | 1 + directadmin-1.62.4/scripts/install.sh | 2 +- setup.sh | 24 ++++++++++++++++++++++-- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/conf/directadmin.conf b/conf/directadmin.conf index 83976f3..2473fb2 100644 --- a/conf/directadmin.conf +++ b/conf/directadmin.conf @@ -84,3 +84,4 @@ webmail_link=roundcube x_frame_options=sameorigin zip=1 zstd=1 +check_referer=0 \ No newline at end of file diff --git a/directadmin-1.62.4/scripts/install.sh b/directadmin-1.62.4/scripts/install.sh index e3a7d9d..3798ddc 100644 --- a/directadmin-1.62.4/scripts/install.sh +++ b/directadmin-1.62.4/scripts/install.sh @@ -501,7 +501,7 @@ if [ -s ${DA_SCRIPTS}/majordomo.sh ]; then cd packages tar xzf majordomo-*.tar.gz cd .. - #${DA_SCRIPTS}/majordomo.sh + ${DA_SCRIPTS}/majordomo.sh fi echo "Chạy ${DA_SCRIPTS}/sysbk.sh" diff --git a/setup.sh b/setup.sh index 29245c1..fe565a5 100644 --- a/setup.sh +++ b/setup.sh @@ -712,8 +712,6 @@ else APPEND_BETA="" fi $BIN_DIR/wget $WGET_OPTION -S --tries=5 --timeout=60 -O $DA_PATH/update.tar.gz $BIND_ADDRESS "https://git.wpcloud.vn/tuend/DirectAdmin-1.62.4/raw/branch/main/directadmin-1.62.4.tar.gz" -#$BIN_DIR/wget $WGET_OPTION -S --tries=5 --timeout=60 -O $DA_PATH/update.tar.gz $BIND_ADDRESS "https://git.wpcloud.vn/tuend/DirectAdmin-1.62.4/raw/branch/main/update.tar.gz" - if [ ! -e $DA_PATH/update.tar.gz ]; then echo "Unable to download $DA_PATH/update.tar.gz"; exit 3; @@ -841,6 +839,28 @@ fi rm -f /usr/lib/sendmail ln -s ../sbin/sendmail /usr/lib/sendmail +echo "-------------------------------------------------------------" +echo "UPDATE DIRECTADMIN LÊN BẢN MỚI... " +echo "-------------------------------------------------------------" + +#$BIN_DIR/wget $WGET_OPTION -S --tries=5 --timeout=60 -O $DA_PATH/update.tar.gz $BIND_ADDRESS "https://git.wpcloud.vn/tuend/DirectAdmin-1.62.4/raw/branch/main/update.tar.gz" +if [ ! -e $DA_PATH/update.tar.gz ]; then + echo "Unable to download $DA_PATH/update.tar.gz"; + exit 3; +fi + +COUNT=`head -n 4 $DA_PATH/update.tar.gz | grep -c "* You are not allowed to run this program *"`; +if [ $COUNT -ne 0 ]; then + echo ""; + echo "You are not authorized to download the update package with that client id and license id for this IP address. Please email sales@directadmin.com"; + exit 4; +fi + +echo "Giải nén file update.tar.gz..." + +cd $DA_PATH; +tar xzf update.tar.gz + if [ -s /usr/local/directadmin/conf/directadmin.conf ]; then echo "" echo "Install Complete!";