Commit d9d332b4 authored by w4t's avatar w4t

wtserver 0.69

parent db239fca
......@@ -8,22 +8,22 @@ InstallAntiVirus() {
echo -n -e "$IDENTATION_LVL_0 ${BWhite}Installing AntiVirus${NC}\n"
if [ "$CFG_ANTISPAM" == "amavisd" ]; then
echo -n -e "$IDENTATION_LVL_1 Installing Antispam utilities (Amavisd-new), Spam filtering (SpamAssassin) and Greylisting (Postgrey) (This take some time. Don't abort it!)...."
echo -n -e "$IDENTATION_LVL_1 Installing Antispam utilities (Amavisd-new), Spam filtering (SpamAssassin) and Greylisting (Postgrey)... "
apt_install amavisd-new spamassassin postgrey
echo "use strict;" > /etc/amavis/conf.d/05-node_id
echo "chomp(\$myhostname = \`hostname --fqdn\`);" >> /etc/amavis/conf.d/05-node_id
echo "\$myhostname = \"$CFG_HOSTNAME_FQDN\";" >> /etc/amavis/conf.d/05-node_id
echo "1;" >> /etc/amavis/conf.d/05-node_id
echo "$CFG_HOSTNAME_FQDN" > /etc/mailname
cho -e " [ ${green}DONE${NC} ] "
echo -n -e "$IDENTATION_LVL_1 Stopping Spamassassin ... "
echo -e "[${green}DONE${NC}]"
echo -n -e "$IDENTATION_LVL_1 Stopping Spamassassin... "
service spamassassin stop >> $PROGRAMS_INSTALL_LOG_FILES 2>&1
echo -e " [ ${green}DONE${NC} ] "
echo -n -e "$IDENTATION_LVL_1 Disable Spamassassin ... "
echo -e "[${green}DONE${NC}]"
echo -n -e "$IDENTATION_LVL_1 Disable Spamassassin... "
systemctl disable spamassassin >> $PROGRAMS_INSTALL_LOG_FILES 2>&1
echo -e " [ ${green}DONE${NC} ] "
echo -e "[${green}DONE${NC}]"
elif [ "$CFG_ANTISPAM" == "rspamd" ]; then
echo -n -e "$IDENTATION_LVL_1 Installing Antispam utilities (Rspamd) (This take some time. Don't abort it!)..."
echo -n -e "$IDENTATION_LVL_1 Installing Antispam utilities (Rspamd)... "
apt_install redis-server lsb-release
if [[ "$(which named)" == "" ]]; then
apt_install unbound
......@@ -38,29 +38,29 @@ InstallAntiVirus() {
echo "compress = true;" >> /etc/rspamd/local.d/history_redis.conf
echo "subject_privacy = false;" >> /etc/rspamd/local.d/history_redis.conf
echo "$CFG_HOSTNAME_FQDN" > /etc/mailname
echo -e " [ ${green}DONE${NC} ] "
echo -n -e "$IDENTATION_LVL_1 Restarting Rspamd..."
echo -e "[${green}DONE${NC}]"
echo -n -e "$IDENTATION_LVL_1 Restarting Rspamd... "
service rspamd restart
echo -e " [ ${green}DONE${NC} ] "
echo -e "[${green}DONE${NC}]"
fi
echo -n -e "$IDENTATION_LVL_1 Installing AntiVirus utilities (ClamAV) (This take some time. Don't abort it!)..."
echo -n -e "$IDENTATION_LVL_1 Installing AntiVirus utilities (ClamAV)... "
apt_install clamav clamav-daemon unzip bzip2 arj nomarch lzop cabextract p7zip p7zip-full lrzip apt-listchanges libnet-ldap-perl libauthen-sasl-perl clamav-docs daemon libclamunrar11 libio-string-perl libio-socket-ssl-perl libnet-ident-perl zip libnet-dns-perl libdbd-mysql-perl unrar-free unp lz4 liblz4-tool rpm2cpio tnef unp
echo -e " [ ${green}DONE${NC} ] "
echo -e "[${green}DONE${NC}]"
echo -n -e "$IDENTATION_LVL_1 Configure AntiVirus ... "
echo -n -e "$IDENTATION_LVL_1 Configure AntiVirus... "
sed -i "s/AllowSupplementaryGroups false/AllowSupplementaryGroups true/" /etc/clamav/clamd.conf
echo -e " [ ${green}DONE${NC} ] "
echo -e "[${green}DONE${NC}]"
if [ "$CFG_AVUPDATE" == "yes" ]; then
echo -n -e "$IDENTATION_LVL_1 Updating ClamAV. (Please Wait. Don't abort it!)..."
echo -n -e "$IDENTATION_LVL_1 Updating ClamAV... "
freshclam >> $PROGRAMS_INSTALL_LOG_FILES 2>&1
echo -e " [ ${green}DONE${NC} ] "
echo -e "[${green}DONE${NC}]"
fi
echo -n -e "$IDENTATION_LVL_1 Restarting ClamAV..."
echo -n -e "$IDENTATION_LVL_1 Restarting ClamAV... "
service clamav-daemon restart >> $PROGRAMS_INSTALL_LOG_FILES 2>&1
echo -e " [ ${green}DONE${NC} ] "
echo -e "[${green}DONE${NC}]"
MeasureTimeDuration $START_TIME
}
......@@ -24,7 +24,20 @@ InstallISPConfig() {
AUTO_INSTALL_INI_LOCATION=$PROGRAMS_INSTALL_DOWNLOAD/ispconfig3_install/install
cd $AUTO_INSTALL_INI_LOCATION
echo -e "[${green}DONE${NC}]"
CFG_MYSQL_ISPCONFIG_PWD=$(tr </dev/urandom -dc 'A-Z-a-z-0-9' | head -c${1:-29})
if [ "$CFG_SQLSERVER" == "MariaDB" ]; then
SQL_COMMAND="mariadb"
else
SQL_COMMAND="mysql"
fi
$SQL_COMMAND -uroot -p"$CFG_MYSQL_ROOT_PWD" -e "CREATE USER 'ispconfig'@'localhost' IDENTIFIED BY $CFG_MYSQL_ISPCONFIG_PWD;" > /dev/null 2>&1
$SQL_COMMAND -uroot -p"$CFG_MYSQL_ROOT_PWD" -e "GRANT ALL PRIVILEGES ON *.* TO 'ispconfig'@'localhost' WITH GRANT OPTION;" > /dev/null 2>&1
$SQL_COMMAND -uroot -p"$CFG_MYSQL_ROOT_PWD" -e "FLUSH PRIVILEGES;" > /dev/null 2>&1
CFG_MYSQL_ROOT_PWD=$(tr </dev/urandom -dc 'A-Z-a-z-0-9' | head -c${1:-29})
if [ "$CFG_ISPC" == "standard" ]; then
echo -n -e "$IDENTATION_LVL_1 Creating autoinstall configuration file... "
cat <<EOF > $AUTO_INSTALL_INI_LOCATION/autoinstall.ini
......@@ -33,8 +46,8 @@ language=en
install_mode=$CFG_ISPC
hostname=$CFG_HOSTNAME_FQDN
mysql_hostname=localhost
mysql_root_user=root
mysql_root_password=$CFG_MYSQL_ROOT_PWD
mysql_root_user=ispconfig
mysql_root_password=$CFG_MYSQL_ISPCONFIG_PWD
mysql_database=dbispconfig
mysql_port=3306
mysql_charset=utf8
......@@ -56,8 +69,8 @@ mysql_ispconfig_user=ispconfig
mysql_ispconfig_password=afStEratXBsgatRtsa42CadwhQ
join_multiserver_setup=$MULTISERVER
mysql_master_hostname=$CFG_MASTER_FQDN
mysql_master_root_user=root
mysql_master_root_password=$CFG_MASTER_MYSQL_ROOT_PWD
mysql_master_root_user=ispconfig
mysql_master_root_password=$CFG_MYSQL_ISPCONFIG_PWD
mysql_master_database=dbispconfig
configure_mail=$CFG_SETUP_MAIL
configure_jailkit=$([ "$CFG_SETUP_WEB" == "yes" ] && echo "$CFG_JKIT" || echo "n")
......@@ -72,8 +85,8 @@ install_ispconfig_web_interface=$CFG_SETUP_MASTER
do_backup=yes
mysql_root_password=$CFG_MYSQL_ROOT_PWD
mysql_master_hostname=$CFG_MASTER_FQDN
mysql_master_root_user=root
mysql_master_root_password=$CFG_MASTER_MYSQL_ROOT_PWD
mysql_master_root_user=ispconfig
mysql_master_root_password=$CFG_MYSQL_ISPCONFIG_PWD
mysql_master_database=dbispconfig
reconfigure_permissions_in_master_database=no
reconfigure_services=yes
......@@ -106,6 +119,8 @@ EOF
Ispconfig3 Admin : admin
Ispconfig3 Password : $CFG_ISPONCFIG_ADMIN_PASS
Ispconfig3 database user : ispconfig
Ispconfig3 database user passw : $CFG_MYSQL_ISPCONFIG_PWD
Ispconfig3 ip : $IP_ADDRESS
Ispconfig3 port : $CFG_ISPONCFIG_PORT
Ispconfig3 app_port : $CFG_ISPONCFIG_APPS_PORT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment