Updated menu
This commit is contained in:
80
installer.sh
80
installer.sh
@@ -60,13 +60,14 @@ domonly=${domain}
|
|||||||
domain=mail.${domain}
|
domain=mail.${domain}
|
||||||
branch=stable
|
branch=stable
|
||||||
dhparam=1024
|
dhparam=1024
|
||||||
|
term=ansi
|
||||||
debconf-set-selections <<< "postfix postfix/mailname string $(hostname -f)"
|
debconf-set-selections <<< "postfix postfix/mailname string $(hostname -f)"
|
||||||
debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'"
|
debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'"
|
||||||
|
|
||||||
##----------------##
|
##----------------##
|
||||||
# Pre-Config #
|
# Pre-Config #
|
||||||
##----------------##
|
##----------------##
|
||||||
TERM=ansi whiptail --title "Info" --infobox "Pre-Configuring" 8 20
|
$ansi whiptail --title "Info" --infobox "Pre-Configuring" 8 20
|
||||||
sleep 2
|
sleep 2
|
||||||
hostnamectl set-hostname $domain > $OUTPUT 2>&1
|
hostnamectl set-hostname $domain > $OUTPUT 2>&1
|
||||||
timedatectl set-timezone Europe/Amsterdam > $OUTPUT 2>&1
|
timedatectl set-timezone Europe/Amsterdam > $OUTPUT 2>&1
|
||||||
@@ -90,7 +91,7 @@ chmod -R 755 /var/www
|
|||||||
##----------------------##
|
##----------------------##
|
||||||
# Pre-Requirements #
|
# Pre-Requirements #
|
||||||
##----------------------##
|
##----------------------##
|
||||||
TERM=ansi whiptail --title "Info" --infobox "Buzzy like a bee" 8 20
|
$ansi whiptail --title "Info" --infobox "Buzzy like a bee" 8 20
|
||||||
$PKGM update
|
$PKGM update
|
||||||
$PKGI software-properties-common
|
$PKGI software-properties-common
|
||||||
$PKGA universe -y > $OUTPUT 2>&1
|
$PKGA universe -y > $OUTPUT 2>&1
|
||||||
@@ -112,14 +113,18 @@ $PKGM remove --purge lxcfs lxd lxd-client geoip-database snapd -y
|
|||||||
$PKGM autoremove -y
|
$PKGM autoremove -y
|
||||||
|
|
||||||
##-----------------------##
|
##-----------------------##
|
||||||
# Html Folder Perms #
|
# HTML Folder Perms #
|
||||||
##-----------------------##
|
##-----------------------##
|
||||||
|
$ansi whiptail --title "Info" --infobox "Configuring HTML permissions" 8 32
|
||||||
|
sleep 1
|
||||||
chown -R www-data:www-data /var/www/"$domain"/html
|
chown -R www-data:www-data /var/www/"$domain"/html
|
||||||
|
|
||||||
##-----------##
|
##-----------##
|
||||||
# NGINX #
|
# NGINX #
|
||||||
##-----------##
|
##-----------##
|
||||||
#$PKGI nginx
|
#$PKGI nginx
|
||||||
|
$ansi whiptail --title "Info" --infobox "Configuring Nginx" 8 21
|
||||||
|
sleep 1
|
||||||
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Web/raw/branch/master/config/nginx/nginx-default.conf -O /etc/nginx/nginx.conf
|
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Web/raw/branch/master/config/nginx/nginx-default.conf -O /etc/nginx/nginx.conf
|
||||||
|
|
||||||
cat <<EOF > /etc/nginx/sites-available/"$domain"
|
cat <<EOF > /etc/nginx/sites-available/"$domain"
|
||||||
@@ -236,23 +241,23 @@ ln -s /etc/nginx/sites-available/"$domain" /etc/nginx/sites-enabled/
|
|||||||
##-------------------------------##
|
##-------------------------------##
|
||||||
# NGINX Single core bug fix #
|
# NGINX Single core bug fix #
|
||||||
##-------------------------------##
|
##-------------------------------##
|
||||||
|
$ansi whiptail --title "Info" --infobox "Applying Nginx bug-fix" 8 26
|
||||||
|
sleep 1
|
||||||
mkdir /etc/systemd/system/nginx.service.d
|
mkdir /etc/systemd/system/nginx.service.d
|
||||||
printf "[Service]\nExecStartPost=/bin/sleep 0.1\n" > /etc/systemd/system/nginx.service.d/override.conf
|
printf "[Service]\nExecStartPost=/bin/sleep 0.1\n" > /etc/systemd/system/nginx.service.d/override.conf
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl restart nginx
|
|
||||||
|
|
||||||
##-----------------------##
|
##-----------------------##
|
||||||
# MySQL Installation #
|
# MySQL Installation #
|
||||||
##-----------------------##
|
##-----------------------##
|
||||||
TERM=ansi whiptail --title "Info" --infobox "Installing MySQL" 8 20
|
$ansi whiptail --title "Info" --infobox "Installing MySQL" 8 20
|
||||||
|
|
||||||
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-MySQL/raw/branch/master/mysql-8.0.sh -O /tmp/mysql-8.0.sh
|
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-MySQL/raw/branch/master/mysql-8.0.sh -O /tmp/mysql-8.0.sh
|
||||||
source /tmp/mysql-8.0.sh
|
source /tmp/mysql-8.0.sh
|
||||||
|
|
||||||
##------------------------------##
|
##------------------------------##
|
||||||
# MySQL_Secure_Installation #
|
# MySQL_Secure_Installation #
|
||||||
##------------------------------##
|
##------------------------------##
|
||||||
TERM=ansi whiptail --title "Info" --infobox "Securing MySQL" 8 19
|
$ansi whiptail --title "Info" --infobox "Securing MySQL" 8 19
|
||||||
|
|
||||||
mysql -u root -p"$password" -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1')" > $OUTPUT 2>&1
|
mysql -u root -p"$password" -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1')" > $OUTPUT 2>&1
|
||||||
mysql -u root -p"$password" -e "DELETE FROM mysql.user WHERE User=''" > $OUTPUT 2>&1
|
mysql -u root -p"$password" -e "DELETE FROM mysql.user WHERE User=''" > $OUTPUT 2>&1
|
||||||
@@ -264,7 +269,7 @@ mysql -u root -p"$password" -e "FLUSH PRIVILEGES;" > $OUTPUT 2>&1
|
|||||||
##-----------------------------##
|
##-----------------------------##
|
||||||
# MySQL Database Creation #
|
# MySQL Database Creation #
|
||||||
##-----------------------------##
|
##-----------------------------##
|
||||||
TERM=ansi whiptail --title "Info" --infobox "Creating MySQL Databases" 8 28
|
$ansi whiptail --title "Info" --infobox "Creating MySQL Databases" 8 28
|
||||||
mysql -u root -p"$password" -e "CREATE DATABASE postfixadmin;" > $OUTPUT 2>&1
|
mysql -u root -p"$password" -e "CREATE DATABASE postfixadmin;" > $OUTPUT 2>&1
|
||||||
mysql -u root -p"$password" -e "CREATE USER '"postfixadmin"'@'localhost' IDENTIFIED BY '"$password"';" > $OUTPUT 2>&1
|
mysql -u root -p"$password" -e "CREATE USER '"postfixadmin"'@'localhost' IDENTIFIED BY '"$password"';" > $OUTPUT 2>&1
|
||||||
mysql -u root -p"$password" -e "GRANT ALL ON "postfixadmin".* TO "postfixadmin"@'localhost';" > $OUTPUT 2>&1
|
mysql -u root -p"$password" -e "GRANT ALL ON "postfixadmin".* TO "postfixadmin"@'localhost';" > $OUTPUT 2>&1
|
||||||
@@ -273,12 +278,12 @@ mysql -u root -p"$password" -e "FLUSH PRIVILEGES;" > $OUTPUT 2>&1
|
|||||||
##------------------##
|
##------------------##
|
||||||
# PostfixADMIN #
|
# PostfixADMIN #
|
||||||
##------------------##
|
##------------------##
|
||||||
$PKGI postfix postfix-mysql
|
#$PKGI postfix postfix-mysql
|
||||||
#$PKGI php${phpver} php${phpver}-zip php${phpver}-fpm php${phpver}-cli php${phpver}-json php${phpver}-mysql php${phpver}-opcache php${phpver}-mbstring php${phpver}-readline
|
#$PKGI php${phpver} php${phpver}-zip php${phpver}-fpm php${phpver}-cli php${phpver}-json php${phpver}-mysql php${phpver}-opcache php${phpver}-mbstring php${phpver}-readline
|
||||||
#$PKGI libc-client2007e mlock php${phpver}-common php${phpver}-imap
|
#$PKGI libc-client2007e mlock php${phpver}-common php${phpver}-imap
|
||||||
TERM=ansi whiptail --title "Info" --infobox "Configuring PostfixAdmin" 8 28
|
$ansi whiptail --title "Info" --infobox "Configuring PostfixAdmin" 8 28
|
||||||
mkdir -p /var/www/"$domain"/html/postfixadmin/templates_c
|
mkdir -p /var/www/"$domain"/html/postfixadmin/templates_c
|
||||||
wget -q -t7 https://git.ictmaatwerk.com/downloads/pfa/postfixadmin-3.1.tar.gz -O /tmp/postfixadmin.tar.gz
|
wget -q -t7 https://git.ictmaatwerk.com/downloads/pfa/postfixadmin-3.1-dark.tar.gz -O /tmp/postfixadmin.tar.gz
|
||||||
tar -xf /tmp/postfixadmin.tar.gz -C /var/www/"$domain"/html/postfixadmin --strip-components=1
|
tar -xf /tmp/postfixadmin.tar.gz -C /var/www/"$domain"/html/postfixadmin --strip-components=1
|
||||||
chmod 755 -R /var/www/"$domain"/html/postfixadmin/templates_c
|
chmod 755 -R /var/www/"$domain"/html/postfixadmin/templates_c
|
||||||
chown -R www-data: /var/www/"$domain"/html/
|
chown -R www-data: /var/www/"$domain"/html/
|
||||||
@@ -292,7 +297,7 @@ useradd -u 5000 -g vmail -s /usr/sbin/nologin -d /var/mail/vmail -m vmail > $OUT
|
|||||||
##--------------------##
|
##--------------------##
|
||||||
# Certbot (Auto) #
|
# Certbot (Auto) #
|
||||||
##--------------------##
|
##--------------------##
|
||||||
#TERM=ansi whiptail --title "Info" --infobox "Configuring Certbot" 8 23
|
$ansi whiptail --title "Info" --infobox "Configuring Certbot" 8 23
|
||||||
#add-apt-repository ppa:certbot/certbot -y
|
#add-apt-repository ppa:certbot/certbot -y
|
||||||
#apt install -y python-certbot-nginx
|
#apt install -y python-certbot-nginx
|
||||||
#certbot --nginx -n -d "$domain" -m "$email" --hsts --redirect --no-eff-email --agree-tos
|
#certbot --nginx -n -d "$domain" -m "$email" --hsts --redirect --no-eff-email --agree-tos
|
||||||
@@ -306,7 +311,8 @@ useradd -u 5000 -g vmail -s /usr/sbin/nologin -d /var/mail/vmail -m vmail > $OUT
|
|||||||
##----------------------##
|
##----------------------##
|
||||||
# Certbot (Manual) #
|
# Certbot (Manual) #
|
||||||
##----------------------##
|
##----------------------##
|
||||||
TERM=ansi whiptail --title "Info" --infobox "Configuring Certbot (manual)" 8 32
|
$ansi whiptail --title "Info" --infobox "Configuring Certbot (manual)" 8 32
|
||||||
|
sleep 1
|
||||||
mkdir -p /etc/letsencrypt/live/$domain/
|
mkdir -p /etc/letsencrypt/live/$domain/
|
||||||
sed -i 's/ssl ipv6only/ssl http2 ipv6only/g' /etc/nginx/sites-available/"$domain"
|
sed -i 's/ssl ipv6only/ssl http2 ipv6only/g' /etc/nginx/sites-available/"$domain"
|
||||||
sed -i 's/listen 443 ssl/listen 443 ssl http2/g' /etc/nginx/sites-available/"$domain"
|
sed -i 's/listen 443 ssl/listen 443 ssl http2/g' /etc/nginx/sites-available/"$domain"
|
||||||
@@ -336,7 +342,8 @@ debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Si
|
|||||||
##---------------------------##
|
##---------------------------##
|
||||||
# Postfix Configuration #
|
# Postfix Configuration #
|
||||||
##---------------------------##
|
##---------------------------##
|
||||||
TERM=ansi whiptail --title "Info" --infobox "Configuring Postfix" 8 23
|
$ansi whiptail --title "Info" --infobox "Configuring Postfix" 8 23
|
||||||
|
sleep 1
|
||||||
mkdir -p /etc/postfix/sql
|
mkdir -p /etc/postfix/sql
|
||||||
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/postfix/mysql_virtual_alias_domain_catchall_maps.cf -O /etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf
|
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/postfix/mysql_virtual_alias_domain_catchall_maps.cf -O /etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf
|
||||||
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/postfix/mysql_virtual_alias_domain_mailbox_maps.cf -O /etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf
|
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/postfix/mysql_virtual_alias_domain_mailbox_maps.cf -O /etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf
|
||||||
@@ -386,7 +393,8 @@ wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/$bran
|
|||||||
##---------------------------##
|
##---------------------------##
|
||||||
# Dovecot Configuration #
|
# Dovecot Configuration #
|
||||||
##---------------------------##
|
##---------------------------##
|
||||||
TERM=ansi whiptail --title "Info" --infobox "Configuring Dovecot" 8 23
|
$ansi whiptail --title "Info" --infobox "Configuring Dovecot" 8 23
|
||||||
|
sleep 1
|
||||||
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/dovecot/15-mailboxes.conf -O /etc/dovecot/conf.d/15-mailboxes.conf
|
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/dovecot/15-mailboxes.conf -O /etc/dovecot/conf.d/15-mailboxes.conf
|
||||||
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/dovecot/10-mail.conf -O /etc/dovecot/conf.d/10-mail.conf
|
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/dovecot/10-mail.conf -O /etc/dovecot/conf.d/10-mail.conf
|
||||||
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/dovecot/10-auth.conf -O /etc/dovecot/conf.d/10-auth.conf
|
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/dovecot/10-auth.conf -O /etc/dovecot/conf.d/10-auth.conf
|
||||||
@@ -405,14 +413,14 @@ chmod +x /usr/local/bin/quota-warning.sh
|
|||||||
##--------------------------------------##
|
##--------------------------------------##
|
||||||
# Dovecot move Spam to Spam Folder #
|
# Dovecot move Spam to Spam Folder #
|
||||||
##--------------------------------------##
|
##--------------------------------------##
|
||||||
TERM=ansi whiptail --title "Info" --infobox "Configuring Spam Folder" 8 27
|
$ansi whiptail --title "Info" --infobox "Configuring Spam Folder" 8 27
|
||||||
sleep 2
|
sleep 1
|
||||||
#$PKGI dovecot-sieve dovecot-managesieved
|
#$PKGI dovecot-sieve dovecot-managesieved
|
||||||
mkdir -p /etc/dovecot/sieve/
|
mkdir -p /etc/dovecot/sieve/
|
||||||
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/$branch/config/dovecot/15-lda.conf -O /etc/dovecot/conf.d/15-lda.conf
|
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/$branch/config/dovecot/15-lda.conf -O /etc/dovecot/conf.d/15-lda.conf
|
||||||
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/dovecot/90-sieve.conf -O /etc/dovecot/conf.d/90-sieve.conf
|
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/dovecot/90-sieve.conf -O /etc/dovecot/conf.d/90-sieve.conf
|
||||||
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/sieve/default.sieve -O /etc/dovecot/sieve/default.sieve
|
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/sieve/default.sieve -O /etc/dovecot/sieve/default.sieve
|
||||||
chown vmail:vmail /etc/dovecot/sieve/ -R
|
chown -R vmail:vmail /etc/dovecot/sieve/
|
||||||
chgrp dovecot /etc/dovecot/conf.d/90-sieve.conf
|
chgrp dovecot /etc/dovecot/conf.d/90-sieve.conf
|
||||||
sievec /etc/dovecot/sieve/default.sieve > $OUTPUT 2>&1
|
sievec /etc/dovecot/sieve/default.sieve > $OUTPUT 2>&1
|
||||||
chgrp dovecot /etc/dovecot/sieve/default.svbin > $OUTPUT 2>&1
|
chgrp dovecot /etc/dovecot/sieve/default.svbin > $OUTPUT 2>&1
|
||||||
@@ -421,7 +429,8 @@ chgrp dovecot /etc/dovecot/sieve/default.svbin > $OUTPUT 2>&1
|
|||||||
# Spamassassin #
|
# Spamassassin #
|
||||||
##------------------##
|
##------------------##
|
||||||
#$PKGI spamassassin spamc razor pyzor
|
#$PKGI spamassassin spamc razor pyzor
|
||||||
TERM=ansi whiptail --title "Info" --infobox "Configuring Spamassassin" 8 28
|
$ansi whiptail --title "Info" --infobox "Configuring Spamassassin" 8 28
|
||||||
|
sleep 1
|
||||||
sed -i -e 's/# report_safe 1/report_safe 0/' -e 's/# required_score 5.0/required_score 5.0/' -e 's/endif # Mail::SpamAssassin::Plugin::Shortcircuit//' /etc/spamassassin/local.cf
|
sed -i -e 's/# report_safe 1/report_safe 0/' -e 's/# required_score 5.0/required_score 5.0/' -e 's/endif # Mail::SpamAssassin::Plugin::Shortcircuit//' /etc/spamassassin/local.cf
|
||||||
echo "" >> /etc/spamassassin/local.cf
|
echo "" >> /etc/spamassassin/local.cf
|
||||||
echo "skip_rbl_checks 0" >> /etc/spamassassin/local.cf
|
echo "skip_rbl_checks 0" >> /etc/spamassassin/local.cf
|
||||||
@@ -446,8 +455,8 @@ echo "endif # Mail::SpamAssassin::Plugin::Shortcircuit" >> /etc/spamassassin/loc
|
|||||||
# ClamAV #
|
# ClamAV #
|
||||||
##------------##
|
##------------##
|
||||||
#$PKGI clamav clamav-daemon clamsmtp libclamunrar7 clamdscan
|
#$PKGI clamav clamav-daemon clamsmtp libclamunrar7 clamdscan
|
||||||
TERM=ansi whiptail --title "Info" --infobox "Configuring ClamAV" 8 22
|
$ansi whiptail --title "Info" --infobox "Configuring ClamAV" 8 22
|
||||||
sleep 2
|
sleep 1
|
||||||
mkdir -p /var/log/clamav
|
mkdir -p /var/log/clamav
|
||||||
mkdir -p /var/lib/clamav
|
mkdir -p /var/lib/clamav
|
||||||
chown -R clamav:clamav /var/log/clamav
|
chown -R clamav:clamav /var/log/clamav
|
||||||
@@ -459,7 +468,8 @@ chmod 775 -R /var/lib/clamav/* /var/lib/clamav
|
|||||||
##------------##
|
##------------##
|
||||||
#$PKGI amavisd-new
|
#$PKGI amavisd-new
|
||||||
#$PKGI zip lrzip liblz4-tool lhasa arj unzip bzip2 nomarch cpio lzop cabextract arc apt-listchanges libauthen-sasl-perl libdbd-mysql-perl libdbi-perl libmail-dkim-perl ripole p7zip p7zip-full p7zip-rar rpm unrar unrar-free altermime libsnmp-perl libnet-ldap-perl libnet-ph-perl libnet-snpp-perl libnet-telnet-perl
|
#$PKGI zip lrzip liblz4-tool lhasa arj unzip bzip2 nomarch cpio lzop cabextract arc apt-listchanges libauthen-sasl-perl libdbd-mysql-perl libdbi-perl libmail-dkim-perl ripole p7zip p7zip-full p7zip-rar rpm unrar unrar-free altermime libsnmp-perl libnet-ldap-perl libnet-ph-perl libnet-snpp-perl libnet-telnet-perl
|
||||||
TERM=ansi whiptail --title "Info" --infobox "Configuring Amavis" 8 22
|
$ansi whiptail --title "Info" --infobox "Configuring Amavis" 8 22
|
||||||
|
sleep 1
|
||||||
sed -i -e 's/@bypass/'@bypass'/' -e 's/ / /' /etc/amavis/conf.d/15-content_filter_mode
|
sed -i -e 's/@bypass/'@bypass'/' -e 's/ / /' /etc/amavis/conf.d/15-content_filter_mode
|
||||||
adduser clamav amavis >/dev/null
|
adduser clamav amavis >/dev/null
|
||||||
sed -i 's/clamd.conf/'clamd.conf'/g' /etc/clamav/freshclam.conf
|
sed -i 's/clamd.conf/'clamd.conf'/g' /etc/clamav/freshclam.conf
|
||||||
@@ -493,8 +503,8 @@ wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$bra
|
|||||||
# Rainloop #
|
# Rainloop #
|
||||||
##--------------##
|
##--------------##
|
||||||
#$PKGI unzip
|
#$PKGI unzip
|
||||||
TERM=ansi whiptail --title "Info" --infobox "Configuring Rainloop" 8 24
|
$ansi whiptail --title "Info" --infobox "Configuring Rainloop" 8 24
|
||||||
sleep 2
|
sleep 1
|
||||||
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/rainloop.sh -O /tmp/rainloop.sh
|
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/rainloop.sh -O /tmp/rainloop.sh
|
||||||
source /tmp/rainloop.sh > $OUTPUT 2>&1
|
source /tmp/rainloop.sh > $OUTPUT 2>&1
|
||||||
ln -s /opt/rainloop /var/www/"$domain"/html/
|
ln -s /opt/rainloop /var/www/"$domain"/html/
|
||||||
@@ -503,8 +513,8 @@ ln -s /opt/rainloop /var/www/"$domain"/html/
|
|||||||
# Fail2Ban #
|
# Fail2Ban #
|
||||||
##--------------##
|
##--------------##
|
||||||
#$PKGI fail2ban
|
#$PKGI fail2ban
|
||||||
TERM=ansi whiptail --title "Info" --infobox "Configuring Fail2Ban" 8 24
|
$ansi whiptail --title "Info" --infobox "Configuring Fail2Ban" 8 24
|
||||||
sleep 2
|
sleep 1
|
||||||
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/fail2ban/dovecot-pop3imap.conf -O /etc/fail2ban/filter.d/dovecot-pop3imap.conf
|
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/fail2ban/dovecot-pop3imap.conf -O /etc/fail2ban/filter.d/dovecot-pop3imap.conf
|
||||||
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/fail2ban/postfix-sasl.conf -O /etc/fail2ban/filter.d/postfix-sasl.conf
|
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/fail2ban/postfix-sasl.conf -O /etc/fail2ban/filter.d/postfix-sasl.conf
|
||||||
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/fail2ban/rainloop.conf -O /etc/fail2ban/filter.d/rainloop.conf
|
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/fail2ban/rainloop.conf -O /etc/fail2ban/filter.d/rainloop.conf
|
||||||
@@ -515,30 +525,30 @@ systemctl restart fail2ban > $OUTPUT 2>&1
|
|||||||
##---------------------------------##
|
##---------------------------------##
|
||||||
# Unattended Security Updates #
|
# Unattended Security Updates #
|
||||||
##---------------------------------##
|
##---------------------------------##
|
||||||
TERM=ansi whiptail --title "Info" --infobox "Configuring Unattended Security Updates" 8 43
|
$ansi whiptail --title "Info" --infobox "Configuring Unattended Security Updates" 8 43
|
||||||
sleep 2
|
sleep 1
|
||||||
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Unattended-Security-Updates/raw/branch/master/installer.sh -O /tmp/unattended.sh
|
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Unattended-Security-Updates/raw/branch/master/installer.sh -O /tmp/unattended.sh
|
||||||
source /tmp/unattended.sh
|
source /tmp/unattended.sh
|
||||||
|
|
||||||
##-----------------------##
|
##-----------------------##
|
||||||
# Enabling Services #
|
# Enabling Services #
|
||||||
##-----------------------##
|
##-----------------------##
|
||||||
TERM=ansi whiptail --title "Info" --infobox "Enabling Services" 8 21
|
$ansi whiptail --title "Info" --infobox "Enabling Services" 8 21
|
||||||
sleep 2
|
sleep 1
|
||||||
systemctl enable nginx mysql postfix postfix@- dovecot fail2ban clamav-daemon clamav-freshclam clamsmtp spamassassin amavisd-snmp-subagent amavis-mc amavis-snmp-subagent > $OUTPUT 2>&1
|
systemctl enable nginx mysql postfix postfix@- dovecot fail2ban clamav-daemon clamav-freshclam clamsmtp spamassassin amavisd-snmp-subagent amavis-mc amavis-snmp-subagent > $OUTPUT 2>&1
|
||||||
|
|
||||||
##-----------------------##
|
##-----------------------##
|
||||||
# Starting Services #
|
# Starting Services #
|
||||||
##-----------------------##
|
##-----------------------##
|
||||||
TERM=ansi whiptail --title "Info" --infobox "Restarting Services" 8 23
|
$ansi whiptail --title "Info" --infobox "Restarting Services" 8 23
|
||||||
sleep 2
|
sleep 1
|
||||||
systemctl restart nginx mysql postfix postfix@- dovecot fail2ban clamav-daemon clamav-freshclam clamsmtp spamassassin amavisd-snmp-subagent amavis-mc amavis-snmp-subagent > $OUTPUT 2>&1
|
systemctl restart nginx mysql postfix postfix@- dovecot fail2ban clamav-daemon clamav-freshclam clamsmtp spamassassin amavisd-snmp-subagent amavis-mc amavis-snmp-subagent > $OUTPUT 2>&1
|
||||||
|
|
||||||
##------------------##
|
##------------------##
|
||||||
# Final Update #
|
# Final Update #
|
||||||
##------------------##
|
##------------------##
|
||||||
TERM=ansi whiptail --title "Info" --infobox "Final Update" 8 16
|
$ansi whiptail --title "Info" --infobox "Final Update" 8 16
|
||||||
sleep 2
|
sleep 1
|
||||||
$PKGM update
|
$PKGM update
|
||||||
$PKGM upgrade -y
|
$PKGM upgrade -y
|
||||||
$PKGM autoremove -y
|
$PKGM autoremove -y
|
||||||
@@ -546,7 +556,7 @@ $PKGM autoremove -y
|
|||||||
##----------------------##
|
##----------------------##
|
||||||
# End of installer #
|
# End of installer #
|
||||||
##----------------------##
|
##----------------------##
|
||||||
TERM=ansi whiptail --title "Info" --infobox "Done installing!" 8 20
|
$ansi whiptail --title "Info" --infobox "Done installing!" 8 20
|
||||||
sleep 3
|
sleep 3
|
||||||
whiptail --title "Credits" --msgbox "Made by: your local Wizard and God" 8 38
|
whiptail --title "Credits" --msgbox "Made by: your local Wizard and God" 8 38
|
||||||
clear
|
clear
|
||||||
Reference in New Issue
Block a user