File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,6 +39,15 @@ AskQuestions() {
3939 CFG_DKIM=n
4040 fi
4141
42+ if (whiptail --title " Mailman" --backtitle " $WT_BACKTITLE " --yesno " Would you like to install Mailman?" 10 50) then
43+ CFG_MAILMAN=y
44+ MMSITEPASS=$( whiptail --title " Mailman Site Password" --backtitle " $WT_BACKTITLE " --inputbox " Please specify the Mailman site password" --nocancel 10 50 3>&1 1>&2 2>&3 )
45+ MMISTOWNER=$( whiptail --title " Mailman Site List Owner" --backtitle " $WT_BACKTITLE " --inputbox " Please specify the Mailman site list owner" --nocancel 10 50 3>&1 1>&2 2>&3 )
46+ MMLISTPASS=$( whiptail --title " Mailman Site List Password" --backtitle " $WT_BACKTITLE " --inputbox " Please specify the Mailman site list password" --nocancel 10 50 3>&1 1>&2 2>&3 )
47+ else
48+ CFG_MAILMAN=n
49+ fi
50+
4251 while [ " x$CFG_WEBMAIL " == " x" ]
4352 do
4453 CFG_WEBMAIL=$( whiptail --title " Webmail client" --backtitle " $WT_BACKTITLE " --nocancel --radiolist " Select your webmail client" 10 50 2 " roundcube" " (default)" ON " squirrelmail" " " OFF 3>&1 1>&2 2>&3 )
Original file line number Diff line number Diff line change 44# ---------------------------------------------------------------------
55InstallAntiVirus () {
66 echo -n " Installing Anti-Virus utilities... "
7- yum -y install amavisd-new spamassassin clamav clamd clamav-update unzip bzip2 unrar perl-DBD-mysql > /dev/null 2>&1
7+ yum -y install amavisd-new spamassassin clamav clamav-server clamav-server-systemd clamav-data-empty clamav- update postgrey unzip bzip2 unrar perl-DBD-mysql > /dev/null 2>&1
88 sed -i " s/Example/#Example/" /etc/freshclam.conf
99 sa-update
1010 freshclam
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ InstallBasics() {
88 echo -e " ${green} done${NC} "
99
1010 echo -n " Installing basic packages... "
11- yum -y install nano wget net-tools NetworkManager-tui
11+ yum -y install nano wget net-tools NetworkManager-tui selinux-policy deltarpm epel-release
1212 echo -e " ${green} done${NC} "
1313
1414 echo -n " Disabling Firewall... "
@@ -22,7 +22,6 @@ InstallBasics() {
2222
2323 echo -n " Enabling additional Repository..."
2424 rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
25- rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm
2625 yum -y install yum-priorities
2726 sed -i " s/mirrorlist=https:\\ /\\ /mirrors.fedoraproject.org\\ /metalink?repo=epel-7\\ &arch=\$ basearch/mirrorlist=https:\\ /\\ /mirrors.fedoraproject.org\\ /metalink?repo=epel-7\\ &arch=\$ basearch\\ ` echo \n ` priority=10/" /etc/yum.repos.d/epel.repo
2827 yum update
Original file line number Diff line number Diff line change 44# ---------------------------------------------------------------------
55InstallBind () {
66 echo -n " Installing bind... " ;
7- yum -y install bind bind-utils > /dev/null 2>&1
7+ yum -y install bind bind-utils haveged > /dev/null 2>&1
88 cp /etc/named.conf /etc/named.conf_bak
99 echo " options {" > /etc/named.conf
1010 echo " listen-on port 53 { any; };" >> /etc/named.conf
Original file line number Diff line number Diff line change 44# ---------------------------------------------------------------------
55
66# Program Versions
7- JKV=" 2.17 " # Jailkit Version -> Maybe this can be automated
7+ JKV=" 2.19 " # Jailkit Version -> Maybe this can be automated
88
99InstallJailkit () {
1010 echo -n " Installing Jailkit... "
Original file line number Diff line number Diff line change 1+ # ---------------------------------------------------------------------
2+ # Function: InstallMailman
3+ # Install the Mailman list manager
4+ # ---------------------------------------------------------------------
5+ InstallMailman () {
6+ echo -n " Installing mailman... " ;
7+ yum -y install mailman > /dev/null 2>&1
8+ /usr/lib/mailman/bin/mmsitepass ${MMSITEPASS}
9+ /usr/lib/mailman/bin/newlist -q mailman ${MMLISTOWNER} ${MMLISTPASS} | grep ' /usr/lib' >> /etc/mailman/aliases
10+ postalias /etc/mailman/aliases
11+ systemctl restart postfix > /dev/null 2>&1
12+ systemctl enable mailman > /dev/null 2>&1
13+ systemctl start mailman > /dev/null 2>&1
14+ echo -e " ${green} done! ${NC} \n"
15+ }
Original file line number Diff line number Diff line change 1+ # ---------------------------------------------------------------------
2+ # Function: InstallMetronom
3+ # Install Metronom Server
4+ # ---------------------------------------------------------------------
5+ InstallMetronom () {
6+ echo -n " Installing Metronome..." ;
7+ yum -y install git lua lua-devel lua-filesystem libidn-devel openssl-devel lua-bitop lua-socket lua-sec luarocks
8+ luarocks install lpc
9+ adduser --no-create-home --shell /sbin/nologin --comment ' Metronome' metronome
10+ cd /opt; git clone https://github.com/maranda/metronome.git metronome
11+ cd ./metronome; ./configure --ostype=centos --prefix=/usr
12+ make
13+ make install
14+ pushd /etc/metronome/certs && make localhost.key && make localhost.csr && make localhost.cert && chmod 0400 localhost.key && chown metronome localhost.key
15+ popd
16+ /bin/rm -rf metronome
17+ echo -e " [${green} DONE${NC} ]\n"
18+ }
Original file line number Diff line number Diff line change 33# Install and configure postfix
44# ---------------------------------------------------------------------
55InstallPostfix () {
6- echo -e " Cheking and disabling sendmail...\n"
6+ echo -e " Checking and disabling sendmail...\n"
77 systemctl stop sendmail.service > /dev/null 2>&1
88 systemctl disable sendmail.service > /dev/null 2>&1
99 echo -e " Installing postfix... \n"
@@ -12,6 +12,9 @@ InstallPostfix() {
1212 mkdir /etc/mailman/
1313 touch /etc/mailman/virtual-mailman
1414 postmap /etc/mailman/virtual-mailman
15+ if [ " $CFG_MAILMAN " == " yes" ]; then
16+ InstallMailman
17+ fi
1518 systemctl enable postfix.service > /dev/null 2>&1
1619 systemctl restart postfix.service > /dev/null 2>&1
1720 echo -e " ${green} done${NC} \n"
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ InstallWebmail() {
1313 mysql -u root -p$CFG_MYSQL_ROOT_PWD -e ' FLUSH PRIVILEGES;'
1414 cat /etc/roundcubemail/config.inc.php.sample | grep -v db_dsnw > /etc/roundcubemail/config.inc.php
1515 sed -i " s/$config = array();/\$ config = array();\\ ` echo \n ` $config [\\ 'db_dsnw\\ '] = \\ 'mysql:\/\/$ROUNDCUBE_USER :$ROUNDCUBE_PWD @localhost\/$ROUNDCUBE_DB \\ ';/" /etc/roundcubemail/config.inc.php
16+ mysql -u $ROUNDCUBE_USER -p$ROUNDCUBE_PWD $ROUNDCUBE_DB < /usr/share/roundcubemail/SQL/mysql.initial.sql
1617 if [ $CFG_WEBSERVER == " apache" ]; then
1718 echo " Alias /roundcubemail /usr/share/roundcubemail" > /etc/httpd/conf.d/roundcubemail.conf
1819 echo " Alias /webmail /usr/share/roundcubemail" >> /etc/httpd/conf.d/roundcubemail.conf
Original file line number Diff line number Diff line change @@ -87,15 +87,18 @@ InstallWebServer() {
8787 sed -i " s/Require ip 127.0.0.1/#Require ip 127.0.0.1/" /etc/httpd/conf.d/phpMyAdmin.conf
8888 sed -i ' 0,/Require ip ::1/ s/Require ip ::1/#Require ip ::1\n Require all granted/' /etc/httpd/conf.d/phpMyAdmin.conf
8989 sed -i " s/'cookie'/'http'/" /etc/phpMyAdmin/config.inc.php
90- echo " Installing Let's Encrypt... "
91- yum -y install letsencrypt > /dev/null 2>&1
92- echo -e " ${green} done!${NC} \n"
9390 systemctl enable httpd.service
9491 systemctl restart httpd.service
9592 echo -e " ${green} done! ${NC} \n"
9693 else
9794 echo " Sorry Nginx not implemented Yet"
9895 read DUMMY
9996 fi
97+
98+ echo -e " ${green} done! ${NC} \n"
99+
100+ echo -n " Installing Let's Encrypt... "
101+ yum -y install certbot
102+
100103 echo -e " ${green} done! ${NC} \n"
101104}
You can’t perform that action at this time.
0 commit comments