Compare commits
13 Commits
3b52e718ca
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f3dc5468bb | ||
|
|
a75d061aba | ||
|
|
1cd3654f62 | ||
|
|
0d4f7e4f28 | ||
|
|
a1cb058090 | ||
|
|
585bff665c | ||
|
|
3c7e9f3116 | ||
|
|
c92e9eb7b5 | ||
|
|
ff3e72d2a0 | ||
|
|
330f41c4c0 | ||
|
|
728597f603 | ||
|
|
e11958f103 | ||
|
|
27eec3dcc6 |
@@ -21,7 +21,7 @@ systemctl restart NetworkManager
|
|||||||
\# INSTALL DIRECTADMIN ONLY CENTOS7 64BIT
|
\# INSTALL DIRECTADMIN ONLY CENTOS7 64BIT
|
||||||
|
|
||||||
```
|
```
|
||||||
wget -O setup.sh https://git.wpcloud.vn/tuend/DirectAdmin-1.62.4/raw/branch/main/install.sh && chmod +x setup.sh && ./setup.sh
|
wget -O setup.sh https://git.wpcloud.vn/tuend/DirectAdmin-1.62.4/raw/branch/main/setup.sh && chmod +x setup.sh && ./setup.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -84,3 +84,4 @@ webmail_link=roundcube
|
|||||||
x_frame_options=sameorigin
|
x_frame_options=sameorigin
|
||||||
zip=1
|
zip=1
|
||||||
zstd=1
|
zstd=1
|
||||||
|
check_referer=0
|
||||||
110
conf/options.conf
Normal file
110
conf/options.conf
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
#PHP Settings
|
||||||
|
php1_release=8.1
|
||||||
|
php1_mode=php-fpm
|
||||||
|
php2_release=7.4
|
||||||
|
php2_mode=php-fpm
|
||||||
|
php3_release=8.2
|
||||||
|
php3_mode=php-fpm
|
||||||
|
php4_release=8.4
|
||||||
|
php4_mode=php-fpm
|
||||||
|
secure_php=yes
|
||||||
|
php_ini=yes
|
||||||
|
php_timezone=Asia/Ho_Chi_Minh
|
||||||
|
php_ini_type=production
|
||||||
|
x_mail_header=yes
|
||||||
|
|
||||||
|
#MySQL Settings
|
||||||
|
mysql=8.0
|
||||||
|
mariadb=10.6
|
||||||
|
mysql_inst=mariadb
|
||||||
|
mysql_backup=yes
|
||||||
|
mysql_backup_gzip=yes
|
||||||
|
mysql_backup_dir=/usr/local/directadmin/custombuild/mysql_backups
|
||||||
|
mysql_force_compile=no
|
||||||
|
|
||||||
|
#WEB Server Settings
|
||||||
|
unit=no
|
||||||
|
webserver=nginx
|
||||||
|
http_methods=ALL
|
||||||
|
litespeed_serialno=trial
|
||||||
|
modsecurity=yes
|
||||||
|
modsecurity_ruleset=comodo
|
||||||
|
apache_ver=2.4
|
||||||
|
apache_mpm=auto
|
||||||
|
mod_ruid2=no
|
||||||
|
userdir_access=yes
|
||||||
|
harden_symlinks_patch=yes
|
||||||
|
use_hostname_for_alias=yes
|
||||||
|
redirect_host=s172d15.wpcloud.vn
|
||||||
|
redirect_host_https=yes
|
||||||
|
|
||||||
|
#WEB Applications Settings
|
||||||
|
phpmyadmin=yes
|
||||||
|
phpmyadmin_public=yes
|
||||||
|
phpmyadmin_ver=5
|
||||||
|
squirrelmail=no
|
||||||
|
roundcube=no
|
||||||
|
webapps_inbox_prefix=no
|
||||||
|
|
||||||
|
#ClamAV-related Settings
|
||||||
|
clamav=no
|
||||||
|
clamav_exim=no
|
||||||
|
modsecurity_uploadscan=no
|
||||||
|
proftpd_uploadscan=no
|
||||||
|
pureftpd_uploadscan=no
|
||||||
|
suhosin_php_uploadscan=no
|
||||||
|
|
||||||
|
#Mail Settings
|
||||||
|
exim=no
|
||||||
|
eximconf=no
|
||||||
|
eximconf_release=4.5
|
||||||
|
blockcracking=no
|
||||||
|
easy_spam_fighter=no
|
||||||
|
spamd=no
|
||||||
|
sa_update=no
|
||||||
|
dovecot=no
|
||||||
|
dovecot_conf=no
|
||||||
|
mail_compress=no
|
||||||
|
pigeonhole=no
|
||||||
|
|
||||||
|
#FTP Settings
|
||||||
|
ftpd=proftpd
|
||||||
|
|
||||||
|
#Statistics Settings
|
||||||
|
awstats=no
|
||||||
|
webalizer=yes
|
||||||
|
|
||||||
|
#PHP Extension Settings
|
||||||
|
#CustomBuild Settings
|
||||||
|
custombuild=2.0
|
||||||
|
custombuild_plugin=yes
|
||||||
|
autover=no
|
||||||
|
bold=yes
|
||||||
|
clean=yes
|
||||||
|
cleanapache=yes
|
||||||
|
clean_old_tarballs=yes
|
||||||
|
clean_old_webapps=yes
|
||||||
|
downloadserver=da-mirror.wpcloud.vn
|
||||||
|
unofficial_mirrors=yes
|
||||||
|
|
||||||
|
#Cronjob Settings
|
||||||
|
cron=yes
|
||||||
|
cron_frequency=daily
|
||||||
|
email=email@domain.com
|
||||||
|
notifications=no
|
||||||
|
updates=no
|
||||||
|
webapps_updates=no
|
||||||
|
|
||||||
|
#CloudLinux Settings
|
||||||
|
cloudlinux=no
|
||||||
|
cloudlinux_beta=no
|
||||||
|
cagefs=no
|
||||||
|
|
||||||
|
#Advanced Settings
|
||||||
|
csf=yes
|
||||||
|
curl=yes
|
||||||
|
ssl_configuration=intermediate
|
||||||
|
|
||||||
|
#PHP extensions can be found in php_extensions.conf
|
||||||
|
redis=yes
|
||||||
|
da_autoupdate=no
|
||||||
Binary file not shown.
@@ -1,86 +0,0 @@
|
|||||||
add_userdb_quota=1
|
|
||||||
admin_ssl_check_retries=0
|
|
||||||
apache_public_html=0
|
|
||||||
apache_ver=2.0
|
|
||||||
backup_gzip=2
|
|
||||||
brute_dos_count=100
|
|
||||||
brute_force_log_scanner=1
|
|
||||||
brute_force_scan_apache_logs=2
|
|
||||||
brute_force_time_limit=1200
|
|
||||||
brutecount=10
|
|
||||||
bruteforce=1
|
|
||||||
carootcert=/usr/local/directadmin/conf/carootcert.pem
|
|
||||||
check_load=0
|
|
||||||
check_partitions=1
|
|
||||||
check_subdomain_owner=0
|
|
||||||
clear_blacklist_ip_time=86400
|
|
||||||
clear_brute_log_entry_time=4
|
|
||||||
clear_brute_log_time=24
|
|
||||||
cloud_cache=0
|
|
||||||
da_gzip=1
|
|
||||||
dataskq_max_instances=1
|
|
||||||
default_private_html_link=1
|
|
||||||
demodocsroot=./data/skins/evolution
|
|
||||||
disable_ip_check=1
|
|
||||||
disk_usage_suspend=0
|
|
||||||
dkim=1
|
|
||||||
dns_ttl=1
|
|
||||||
docsroot=./data/skins/evolution
|
|
||||||
dovecot=1
|
|
||||||
email_ftp_password_change=1
|
|
||||||
enforce_difficult_passwords=0
|
|
||||||
ethernet_dev=eth0:100
|
|
||||||
exempt_local_block=1
|
|
||||||
filemanager_du=1
|
|
||||||
frontpage_on=0
|
|
||||||
get_current_version_timeout=0
|
|
||||||
hide_brute_force_notifications=1
|
|
||||||
http2=1
|
|
||||||
ip_brutecount=20
|
|
||||||
ipv6=0
|
|
||||||
jail=1
|
|
||||||
letsencrypt=1
|
|
||||||
litespeed=0
|
|
||||||
logs_to_keep=5
|
|
||||||
lost_password=0
|
|
||||||
mail_sni=1
|
|
||||||
max_per_email_send_limit=-1
|
|
||||||
max_username_length=30
|
|
||||||
maxfilesize=21474836480
|
|
||||||
mysql_detect_correct_methods=1
|
|
||||||
nginx=1
|
|
||||||
nginx_proxy=0
|
|
||||||
notify_on_license_update=0
|
|
||||||
ns1=ns1.s172d15.wpcloud.vn
|
|
||||||
ns2=ns2.s172d15.wpcloud.vn
|
|
||||||
one_click_pma_login=1
|
|
||||||
one_click_webmail_login=1
|
|
||||||
openlitespeed=0
|
|
||||||
partition_usage_threshold=95
|
|
||||||
php_fpm_max_children_default=10
|
|
||||||
pointers_own_virtualhost=1
|
|
||||||
port=8443
|
|
||||||
pureftp=0
|
|
||||||
purge_spam_days=0
|
|
||||||
quota_partition=/
|
|
||||||
random_password_length=20
|
|
||||||
secure_access_group=access
|
|
||||||
servername=s172d15.wpcloud.vn
|
|
||||||
session_minutes=600
|
|
||||||
show_info_in_header=0
|
|
||||||
show_info_in_title=0
|
|
||||||
special_characters_in_random_passwords=2
|
|
||||||
ssl=1
|
|
||||||
ssl_redirect_host=s172d15.wpcloud.vn
|
|
||||||
system_user_to_virtual_passwd=1
|
|
||||||
timeout=600
|
|
||||||
unblock_brute_ip_time=86400
|
|
||||||
unified_ftp_password_file=1
|
|
||||||
use_cookie_expires=0
|
|
||||||
use_xfs_quota=1
|
|
||||||
user_brutecount=20
|
|
||||||
user_can_set_email_limit=1
|
|
||||||
webmail_link=roundcube
|
|
||||||
x_frame_options=sameorigin
|
|
||||||
zip=1
|
|
||||||
zstd=1
|
|
||||||
Binary file not shown.
@@ -401,7 +401,7 @@ getServices() {
|
|||||||
servfile=`cat ./setup.txt | grep services= | cut -d= -f2`;
|
servfile=`cat ./setup.txt | grep services= | cut -d= -f2`;
|
||||||
|
|
||||||
#get the md5sum
|
#get the md5sum
|
||||||
wget https://raw.githubusercontent.com/irf1404/Directadmin/master/services/${servfile}.md5 -O ${SERVICES_FILE}.md5
|
wget https://git.wpcloud.vn/tuend/DirectAdmin-1.62.4/raw/branch/main/services/${servfile}.md5 -O ${SERVICES_FILE}.md5
|
||||||
if [ ! -s ${SERVICES_FILE}.md5 ];
|
if [ ! -s ${SERVICES_FILE}.md5 ];
|
||||||
then
|
then
|
||||||
echo "";
|
echo "";
|
||||||
@@ -410,7 +410,7 @@ getServices() {
|
|||||||
sleep 4;
|
sleep 4;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wget https://raw.githubusercontent.com/irf1404/Directadmin/master/services/${servfile} -O $SERVICES_FILE
|
wget https://git.wpcloud.vn/tuend/DirectAdmin-1.62.4/raw/branch/main/services/${servfile} -O $SERVICES_FILE
|
||||||
if [ $? -ne 0 ]
|
if [ $? -ne 0 ]
|
||||||
then
|
then
|
||||||
echo "Error downloading the services file";
|
echo "Error downloading the services file";
|
||||||
@@ -436,19 +436,29 @@ getServices() {
|
|||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
echo "Chạy doGetInfo"
|
||||||
doGetInfo
|
doGetInfo
|
||||||
|
echo "Chạy doSetHostname"
|
||||||
doSetHostname
|
doSetHostname
|
||||||
|
echo "Chạy createDAbase"
|
||||||
createDAbase
|
createDAbase
|
||||||
|
echo "Chạy copyStartupScripts"
|
||||||
copyStartupScripts
|
copyStartupScripts
|
||||||
|
echo "Chạy "
|
||||||
#copyCronFile #moved lower, after custombuild, march 7, 2011
|
#copyCronFile #moved lower, after custombuild, march 7, 2011
|
||||||
|
echo "Chạy touchExim"
|
||||||
touchExim
|
touchExim
|
||||||
|
echo "Chạy ./fstab.sh"
|
||||||
./fstab.sh
|
./fstab.sh
|
||||||
${DA_SCRIPTS}/cron_deny.sh
|
${DA_SCRIPTS}/cron_deny.sh
|
||||||
touch /root/.skip_get_license
|
touch /root/.skip_get_license
|
||||||
|
echo "Chạy getLicense"
|
||||||
getLicense
|
getLicense
|
||||||
#getServices
|
|
||||||
|
echo "-------------------------------------------------------------"
|
||||||
|
echo "Chạy getServices"
|
||||||
|
echo "-------------------------------------------------------------"
|
||||||
|
getServices
|
||||||
|
|
||||||
if [ ! -e ${DA_PATH}/custombuild/options.conf ] && [ -e /etc/redhat-release ] && [ ! -e /etc/init.d/xinetd ] && [ -e /usr/bin/yum ]; then
|
if [ ! -e ${DA_PATH}/custombuild/options.conf ] && [ -e /etc/redhat-release ] && [ ! -e /etc/init.d/xinetd ] && [ -e /usr/bin/yum ]; then
|
||||||
yum -y install xinetd
|
yum -y install xinetd
|
||||||
@@ -494,19 +504,26 @@ if [ -s ${DA_SCRIPTS}/majordomo.sh ]; then
|
|||||||
${DA_SCRIPTS}/majordomo.sh
|
${DA_SCRIPTS}/majordomo.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Chạy ${DA_SCRIPTS}/sysbk.sh"
|
||||||
|
|
||||||
${DA_SCRIPTS}/sysbk.sh
|
${DA_SCRIPTS}/sysbk.sh
|
||||||
|
|
||||||
|
echo "Chạy ./build all d"
|
||||||
cd ${DA_PATH}/custombuild
|
cd ${DA_PATH}/custombuild
|
||||||
|
|
||||||
|
echo "-------------------------------------------------------------"
|
||||||
echo "Bắt đầu build..... "
|
echo "Bắt đầu build..... "
|
||||||
|
echo "-------------------------------------------------------------"
|
||||||
|
|
||||||
chmod 755 build
|
chmod 755 build
|
||||||
|
./build update_script
|
||||||
./build update
|
./build update
|
||||||
./build all d
|
./build all d
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
copyCronFile
|
copyCronFile
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
echo "Chạy copyCronFile"
|
||||||
#moved here march 7, 2011
|
#moved here march 7, 2011
|
||||||
copyCronFile
|
copyCronFile
|
||||||
|
|
||||||
@@ -529,10 +546,10 @@ if [ ! -e /usr/local/bin/php ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Chạy ./directadmin i"
|
||||||
cd ${DA_PATH}
|
cd ${DA_PATH}
|
||||||
./directadmin i
|
./directadmin i
|
||||||
|
echo "Chạy /directadmin p"
|
||||||
cd ${DA_PATH}
|
cd ${DA_PATH}
|
||||||
./directadmin p
|
./directadmin p
|
||||||
|
|
||||||
|
|||||||
@@ -243,12 +243,7 @@ clean_dev()
|
|||||||
|
|
||||||
echo -n "Is $DEVS your network adaptor with the license IP ($DIP)? (y,n) : ";
|
echo -n "Is $DEVS your network adaptor with the license IP ($DIP)? (y,n) : ";
|
||||||
read yesno;
|
read yesno;
|
||||||
if [ "$yesno" = "n" ]; then
|
|
||||||
echo -n "Enter the name of the ethernet device you wish to use : ";
|
|
||||||
read ETH_DEV;
|
|
||||||
else
|
|
||||||
ETH_DEV=$DEVS
|
ETH_DEV=$DEVS
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
# more than one
|
# more than one
|
||||||
echo "The following ethernet devices/IPs were found. Please enter the name of the device you wish to use:";
|
echo "The following ethernet devices/IPs were found. Please enter the name of the device you wish to use:";
|
||||||
@@ -309,45 +304,45 @@ clean_dev()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ $CMD_LINE -eq 0 ]; then
|
# if [ $CMD_LINE -eq 0 ]; then
|
||||||
|
|
||||||
echo -n "Your external IP: ";
|
# echo -n "Your external IP: ";
|
||||||
wget -q -O - http://myip.directadmin.com
|
# wget -q -O - http://myip.directadmin.com
|
||||||
echo "";
|
# echo "";
|
||||||
echo "The external IP should typically match your license IP.";
|
# echo "The external IP should typically match your license IP.";
|
||||||
echo "";
|
# echo "";
|
||||||
|
|
||||||
if [ "$IP" = "" ]; then
|
# if [ "$IP" = "" ]; then
|
||||||
yesno="n";
|
# yesno="n";
|
||||||
else
|
# else
|
||||||
echo -n "Is $IP the IP in your license? (y,n) : ";
|
# echo -n "Is $IP the IP in your license? (y,n) : ";
|
||||||
read yesno;
|
# read yesno;
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
if [ "$yesno" = "n" ]; then
|
# if [ "$yesno" = "n" ]; then
|
||||||
echo -n "Enter the IP used in your license file : ";
|
# echo -n "Enter the IP used in your license file : ";
|
||||||
read IP;
|
# read IP;
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
if [ "$IP" = "" ]; then
|
# if [ "$IP" = "" ]; then
|
||||||
echo "The IP entered is blank. Please try again, and enter a valid IP";
|
# echo "The IP entered is blank. Please try again, and enter a valid IP";
|
||||||
fi
|
# fi
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
############
|
############
|
||||||
|
|
||||||
echo "";
|
echo "";
|
||||||
echo "DirectAdmin will now be installed on: $OS $OS_VER";
|
echo "DirectAdmin will now be installed on: $OS $OS_VER";
|
||||||
|
|
||||||
if [ $CMD_LINE -eq 0 ]; then
|
# if [ $CMD_LINE -eq 0 ]; then
|
||||||
echo -n "Is this correct? (must match license) (y,n) : ";
|
# echo -n "Is this correct? (must match license) (y,n) : ";
|
||||||
read yesno;
|
# read yesno;
|
||||||
|
|
||||||
if [ "$yesno" = "n" ]; then
|
# if [ "$yesno" = "n" ]; then
|
||||||
echo -e "\nPlease change the value in your license, or install the correct operating system\n";
|
# echo -e "\nPlease change the value in your license, or install the correct operating system\n";
|
||||||
exit 1;
|
# exit 1;
|
||||||
fi
|
# fi
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
# Hexan
|
# Hexan
|
||||||
PWD_DIR=`pwd`
|
PWD_DIR=`pwd`
|
||||||
@@ -716,9 +711,7 @@ if ${DOWNLOAD_BETA}; then
|
|||||||
else
|
else
|
||||||
APPEND_BETA=""
|
APPEND_BETA=""
|
||||||
fi
|
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/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
|
if [ ! -e $DA_PATH/update.tar.gz ]; then
|
||||||
echo "Unable to download $DA_PATH/update.tar.gz";
|
echo "Unable to download $DA_PATH/update.tar.gz";
|
||||||
exit 3;
|
exit 3;
|
||||||
@@ -753,7 +746,7 @@ fi
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
# write the setup.txt
|
# write the setup.txt
|
||||||
|
echo "Chạy write the setup.txt $SETUP"
|
||||||
echo "hostname=$HOST" > $SETUP;
|
echo "hostname=$HOST" > $SETUP;
|
||||||
echo "email=$EMAIL" >> $SETUP;
|
echo "email=$EMAIL" >> $SETUP;
|
||||||
echo "mysql=$DB_ROOT_PASS" >> $SETUP;
|
echo "mysql=$DB_ROOT_PASS" >> $SETUP;
|
||||||
@@ -782,7 +775,9 @@ chmod 600 $SETUP
|
|||||||
# Install it
|
# Install it
|
||||||
|
|
||||||
cd $SCRIPTS_PATH;
|
cd $SCRIPTS_PATH;
|
||||||
|
echo "-----------------"
|
||||||
|
echo "Chạy ./install.sh $CMD_LINE"
|
||||||
|
echo "-----------------"
|
||||||
./install.sh $CMD_LINE
|
./install.sh $CMD_LINE
|
||||||
|
|
||||||
RET=$?
|
RET=$?
|
||||||
@@ -844,6 +839,28 @@ fi
|
|||||||
rm -f /usr/lib/sendmail
|
rm -f /usr/lib/sendmail
|
||||||
ln -s ../sbin/sendmail /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
|
if [ -s /usr/local/directadmin/conf/directadmin.conf ]; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "Install Complete!";
|
echo "Install Complete!";
|
||||||
BIN
update.tar.gz
BIN
update.tar.gz
Binary file not shown.
@@ -478,7 +478,8 @@ ${DA_SCRIPTS}/cron_deny.sh
|
|||||||
|
|
||||||
echo "Chạy getLicense"
|
echo "Chạy getLicense"
|
||||||
getLicense
|
getLicense
|
||||||
#getServices
|
echo "Chạy getServices"
|
||||||
|
getServices
|
||||||
|
|
||||||
if [ ! -e ${DA_PATH}/custombuild/options.conf ] && [ -e /etc/redhat-release ] && [ ! -e /etc/init.d/xinetd ] && [ -e /usr/bin/yum ]; then
|
if [ ! -e ${DA_PATH}/custombuild/options.conf ] && [ -e /etc/redhat-release ] && [ ! -e /etc/init.d/xinetd ] && [ -e /usr/bin/yum ]; then
|
||||||
yum -y install xinetd
|
yum -y install xinetd
|
||||||
|
|||||||
@@ -1720,7 +1720,7 @@ $BIN_DIR/wget $WGET_OPTION -S --tries=5 --timeout=60 -O $DA_PATH/update.tar.gz $
|
|||||||
|
|
||||||
if [ ! -e $DA_PATH/update.tar.gz ]; then
|
if [ ! -e $DA_PATH/update.tar.gz ]; then
|
||||||
echo "Unable to download $DA_PATH/update.tar.gz";
|
echo "Unable to download $DA_PATH/update.tar.gz";
|
||||||
exit 3;
|
#exit 3;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
COUNT=`head -n 4 $DA_PATH/update.tar.gz | grep -c "* You are not allowed to run this program *"`;
|
COUNT=`head -n 4 $DA_PATH/update.tar.gz | grep -c "* You are not allowed to run this program *"`;
|
||||||
@@ -1731,7 +1731,7 @@ if [ $COUNT -ne 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
cd $DA_PATH;
|
cd $DA_PATH;
|
||||||
tar xzf update.tar.gz
|
#tar xzf update.tar.gz
|
||||||
|
|
||||||
if [ ! -e $DA_PATH/directadmin ]; then
|
if [ ! -e $DA_PATH/directadmin ]; then
|
||||||
echo "Cannot find the DirectAdmin binary. Extraction failed";
|
echo "Cannot find the DirectAdmin binary. Extraction failed";
|
||||||
@@ -1751,7 +1751,7 @@ fi
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
# write the setup.txt
|
# write the setup.txt
|
||||||
|
echo "Chạy write the $SETUP"
|
||||||
echo "hostname=$HOST" > $SETUP;
|
echo "hostname=$HOST" > $SETUP;
|
||||||
echo "email=$EMAIL" >> $SETUP;
|
echo "email=$EMAIL" >> $SETUP;
|
||||||
echo "mysql=$DB_ROOT_PASS" >> $SETUP;
|
echo "mysql=$DB_ROOT_PASS" >> $SETUP;
|
||||||
@@ -1782,6 +1782,8 @@ chmod 600 $SETUP
|
|||||||
cd $SCRIPTS_PATH;
|
cd $SCRIPTS_PATH;
|
||||||
|
|
||||||
chmod 700 install.sh
|
chmod 700 install.sh
|
||||||
|
|
||||||
|
echo "Chạy ./install.sh $CMD_LINE"
|
||||||
./install.sh $CMD_LINE
|
./install.sh $CMD_LINE
|
||||||
RET=$?
|
RET=$?
|
||||||
|
|
||||||
@@ -1812,32 +1814,6 @@ if [ -e /etc/aliases ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#CSF if AUTO
|
|
||||||
if [ "${OS}" != "FreeBSD" ] && [ "${AUTO}" = "1" ]; then
|
|
||||||
CSF_LOG=/var/log/directadmin/csf_install.log
|
|
||||||
CSF_SH=/root/csf_install.sh
|
|
||||||
wget -O ${CSF_SH} ${SERVER}/all/csf/csf_install.sh > ${CSF_LOG} 2>&1
|
|
||||||
if [ ! -s ${CSF_SH} ]; then
|
|
||||||
echo "Error downloading ${SERVER}/all/csf/csf_install.sh"
|
|
||||||
cat ${CSF_LOG}
|
|
||||||
else
|
|
||||||
#run it
|
|
||||||
chmod 755 ${CSF_SH}
|
|
||||||
${CSF_SH} auto >> ${CSF_LOG} 2>&1
|
|
||||||
USE_IPSET=true
|
|
||||||
if [ -x /usr/bin/systemd-detect-virt ]; then
|
|
||||||
if systemd-detect-virt | grep -m1 -q -E 'lxc|openvz'; then
|
|
||||||
USE_IPSET=false
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if ${USE_IPSET} && grep -m1 -q '^LF_IPSET = "0"' /etc/csf/csf.conf; then
|
|
||||||
perl -pi -e 's|^LF_IPSET = "0"|LF_IPSET = "1"|g' /etc/csf/csf.conf
|
|
||||||
csf -r >> /dev/null 2>&1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
${BUILD} secure_php
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f /usr/lib/sendmail
|
rm -f /usr/lib/sendmail
|
||||||
ln -s ../sbin/sendmail /usr/lib/sendmail
|
ln -s ../sbin/sendmail /usr/lib/sendmail
|
||||||
|
|||||||
Reference in New Issue
Block a user