erste Freigabe
This commit is contained in:
parent
96ce83c39d
commit
067d0714fb
90
rainloop-webmail-installer.sh
Normal file
90
rainloop-webmail-installer.sh
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##########################################################################################
|
||||||
|
# .--.
|
||||||
|
# |o_o |
|
||||||
|
# |:_/ |
|
||||||
|
# // \ \
|
||||||
|
# (| | )
|
||||||
|
# /'\_ _/`\
|
||||||
|
# \___)=(___/
|
||||||
|
# _ _ _ _ _ _ _
|
||||||
|
#__ __ ___ | |__ _ __ ___ __ _ (_)| | (_) _ __ ___ | |_ __ _ | || | ___ _ __
|
||||||
|
#\ \ /\ / // _ \| '_ \ | '_ ` _ \ / _` || || | _____ | || '_ \ / __|| __|/ _` || || | / _ \| '__|
|
||||||
|
# \ V V /| __/| |_) || | | | | || (_| || || ||_____|| || | | |\__ \| |_| (_| || || || __/| |
|
||||||
|
# \_/\_/ \___||_.__/ |_| |_| |_| \__,_||_||_| |_||_| |_||___/ \__|\__,_||_||_| \___||_|
|
||||||
|
#
|
||||||
|
# (c) Patrick Asmus
|
||||||
|
# https://www.media-techport.de
|
||||||
|
##########################################################################################
|
||||||
|
# Letzte Anpassung: 09. September 2022
|
||||||
|
# Version 1.5.0
|
||||||
|
##########################################################################################
|
||||||
|
clear
|
||||||
|
echo Dieses Skript wurde auf folgenden Systemen erfolgreich getestet: LXC:Ubuntu 20.04
|
||||||
|
sleep 4
|
||||||
|
mkdir -p /var/log/installer-logs
|
||||||
|
exec > >(tee -i "/var/log/installer-logs/rainloop-webmail-install.log")
|
||||||
|
exec 2>&1
|
||||||
|
HOSTNAME="$(hostname)"
|
||||||
|
SUBDOMAIN_EXT=webmail.media-techport.de
|
||||||
|
SUBDOMAIN_INT=webmail.media-techport.int
|
||||||
|
WEBMASTER_EMAIL=webmaster@media-techport.de
|
||||||
|
#Globale Funktion zur Aktualisierung und Bereinigung der Umgebung
|
||||||
|
function update_and_clean {
|
||||||
|
apt update
|
||||||
|
apt full-upgrade -y
|
||||||
|
apt autoclean -y
|
||||||
|
apt autoremove -y
|
||||||
|
}
|
||||||
|
#START
|
||||||
|
sleep 2
|
||||||
|
update_and_clean
|
||||||
|
#rainloop-install
|
||||||
|
apt install sudo curl -y
|
||||||
|
sudo apt install apache2 php7.4 libapache2-mod-php7.4 -y
|
||||||
|
apt install php-curl php-dom php-mysql -y
|
||||||
|
mkdir -p /temp/rainloop
|
||||||
|
cd /temp/rainloop
|
||||||
|
mkdir -p /var/www/html/$SUBDOMAIN_EXT
|
||||||
|
curl -s http://repository.rainloop.net/installer.php | php
|
||||||
|
sudo mv * /var/www/html/$SUBDOMAIN_EXT
|
||||||
|
sudo chown www-data:www-data /var/www/html/$SUBDOMAIN_EXT -R
|
||||||
|
sudo touch /etc/apache2/sites-available/$SUBDOMAIN_EXT.conf
|
||||||
|
cat <<EOF >/etc/apache2/sites-available/$SUBDOMAIN_EXT.conf
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName $SUBDOMAIN_EXT
|
||||||
|
ServerAlias $SUBDOMAIN_INT
|
||||||
|
ServerAdmin $WEBMASTER_EMAIL
|
||||||
|
DocumentRoot "/var/www/html/$SUBDOMAIN_EXT/"
|
||||||
|
|
||||||
|
ErrorLog "/var/log/apache2/$SUBDOMAIN_EXT_error_log"
|
||||||
|
TransferLog "/var/log/apache2/$SUBDOMAIN_EXT_access_log"
|
||||||
|
|
||||||
|
<Directory />
|
||||||
|
Options +Indexes +FollowSymLinks +ExecCGI
|
||||||
|
AllowOverride All
|
||||||
|
Order deny,allow
|
||||||
|
Allow from all
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
<Directory /var/www/html/$SUBDOMAIN_EXT/data>
|
||||||
|
Require all denied
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
</VirtualHost>
|
||||||
|
EOF
|
||||||
|
sudo a2ensite $SUBDOMAIN_EXT.conf
|
||||||
|
sudo a2dissite 000-default.conf
|
||||||
|
sudo systemctl reload apache2
|
||||||
|
sudo sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 50M/g' /etc/php/7.4/apache2/php.ini
|
||||||
|
sudo sed -i 's/post_max_size = 8M/post_max_size = 50M/g' /etc/php/7.4/apache2/php.ini
|
||||||
|
sleep 2
|
||||||
|
echo --------------------------------------------------------
|
||||||
|
echo Die Webseite bzw. das Admininterface sollte nun erreichbar sein unter: https://$SUBDOMAIN_EXT/?admin
|
||||||
|
echo Benutzername: admin
|
||||||
|
echo Initialpasswort: 12345
|
||||||
|
echo --------------------------------------------------------
|
||||||
|
echo Fertig. Zeit fuer ein riesengrosses Bierchen.
|
||||||
|
cat /dev/null > ~/.bash_history && history -c && history -w
|
||||||
|
exit 0
|
Loading…
Reference in New Issue
Block a user