update for ubuntu 22.04
This commit is contained in:
parent
4bc264d0fd
commit
19dca486f7
35
install.sh
35
install.sh
|
@ -6,8 +6,8 @@ if [ "${EUID}" -ne 0 ]; then
|
|||
fi
|
||||
|
||||
# check for Ubuntu 20.04
|
||||
if ! grep -q "Ubuntu 20.04" /etc/issue; then
|
||||
echo "This installer is only tested on Ubuntu 20.04. If you are on a"
|
||||
if ! grep -q "Ubuntu 22.04" /etc/issue; then
|
||||
echo "This installer is only tested on Ubuntu 22.04. If you are on a"
|
||||
echo "different version of Ubuntu or a Debian/Debian based distro"
|
||||
echo "and want to try running this installer open this script and"
|
||||
echo "comment out the exit command below this line and re-run."
|
||||
|
@ -38,13 +38,9 @@ if [ ! -d "/etc/mysql/" ]; then
|
|||
|
||||
MARIADBPWORD=`pwgen 12 1`
|
||||
apt -y install mariadb-client mariadb-server
|
||||
# record the initial root password
|
||||
echo "#[client]" > /root/.my.cnf
|
||||
echo "#password=$MARIADBPWORD" >> /root/.my.cnf
|
||||
echo '!include /etc/mysql/debian.cnf' >> /root/.my.cnf
|
||||
chmod 600 /root/.my.cnf
|
||||
mysql -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('$MARIADBPWORD');"
|
||||
sed -i "s|password = |password = $MARIADBPWORD|g" /etc/mysql/debian.cnf
|
||||
# set unix_socket auth for root
|
||||
mysql -e "GRANT ALL ON *.* TO 'root'@'localhost' IDENTIFIED VIA unix_socket WITH GRANT OPTION"
|
||||
# create nagios user for monitoring server status only
|
||||
mysql -e "CREATE USER 'nagios'@'localhost' IDENTIFIED WITH mysql_native_password AS '';"
|
||||
mysqladmin flush-privileges
|
||||
|
||||
|
@ -98,7 +94,7 @@ chown debian-spamd:mail /etc/spamassassin/sql.cf
|
|||
chmod 640 /etc/spamassassin/sql.cf
|
||||
|
||||
# srsd
|
||||
# bug fixes for libmail-srs-perl. still needed as of v0.31-6 on Ubuntu 20.04
|
||||
# bug fixes for libmail-srs-perl. still needed as of v0.31-6 on Ubuntu 22.04
|
||||
sed -i 's|/tmp/srsd|/run/srsd/srsd.sock|' /usr/share/perl5/Mail/SRS/Daemon.pm
|
||||
sed -i '/Until we decide that forward/,+3d' /usr/share/perl5/Mail/SRS/Daemon.pm
|
||||
cp systemd/srsd.service /lib/systemd/system/srsd.service
|
||||
|
@ -160,23 +156,4 @@ chmod 644 /usr/lib/systemd/system/vmail-cron.*
|
|||
systemctl enable vmail-cron.timer
|
||||
systemctl start vmail-cron.timer
|
||||
|
||||
# download and install roundcubemail
|
||||
# cd /usr/local/src/
|
||||
# wget --continue --quiet https://github.com/roundcube/roundcubemail/releases/download/1.4.11/roundcubemail-1.4.11-complete.tar.gz
|
||||
# tar zxf roundcubemail-1.4.11-complete.tar.gz
|
||||
# cd roundcubemail-1.4.11
|
||||
# pwd
|
||||
# apache_document_root=`apachectl -t -D DUMP_RUN_CFG|grep DocumentRoot|cut -d \" -f 2`
|
||||
# config
|
||||
# change product_name as desired
|
||||
# change support_url
|
||||
# bin/initdb.sh
|
||||
#
|
||||
#
|
||||
# # set webmail password
|
||||
# sed -i "s|vmail:password@localhost|vmail:$VMAILPASS@localhost|g" /var/www/html/webmail/config/config.inc.php
|
||||
# sed -i "s|vmail:password@localhost|vmail:$VMAILPASS@localhost|g" /var/www/html/webmail/plugins/sauserprefs/config.inc.php
|
||||
#
|
||||
#
|
||||
#
|
||||
# notes about firewalls
|
||||
|
|
Loading…
Reference in New Issue
Block a user