From e7942ef5338595871782c48ccee0cc6322f64c84 Mon Sep 17 00:00:00 2001 From: ictmaatwerk Date: Fri, 21 Sep 2018 13:27:01 +0000 Subject: [PATCH] Update 'Main-Installer.sh' --- Main-Installer.sh | 89 ++++++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 51 deletions(-) diff --git a/Main-Installer.sh b/Main-Installer.sh index 8c59d37..0c3321d 100644 --- a/Main-Installer.sh +++ b/Main-Installer.sh @@ -1,38 +1,23 @@ #!/bin/bash -# Bash Menu Script Example -#============================================================================== -# UBUNTU 18.04 BASH SCRIPT -#============================================================================== -##R1 V1.1## -#===Changes For V1===# -#Added Variables and executes for them# -#===Changes For V1.1===# -# Nginx, apache, certbot, phpmyadmin, php-fpm, postfix, netdata, Memcached, redis, wordpress & opcache# -#install scripts were added# -#============================================================================== -# UNDER DEVELOPMENT -#============================================================================== -# Mailserver -->> EXIM, DOVECOT, SPAMASSASSIN, CLAMAV -# FTP backups -->> VSFTPD -# Secure WP -->> NGINX RULES -# WP backup & restore -->> SHELL or PHP -# LAMP SETUP -# APACHE, NGINX REVERSE PROXY -#============================================================================== -# CHECKEN! -# > Postfix -#============================================================================== +###============================================================ +## Ubuntu 18.04 Web Server Installer +###============================================================ +## Zet comments hieronder: +# +# +# +##============================================================= -#--------# -# Menu # -#--------# +##----------## +# Menu # +##----------## -echo "UBUNTU 18.04 INSTALLATIE SCRIPT" -echo Welk domein mag gekoppeld worden? Typ domein zonder www +echo "Ubuntu 18.04 installatie script." +echo "Domein zonder www:" read domain -echo Standaard wachtwoord -read passwd -echo administrator email +echo "Algemeen wachtwoord:" +read password +echo "Administrator email:" read email echo "Webserver:" PS3='Keuze:' @@ -99,11 +84,14 @@ while true; do esac done -#-------------------# -# Preconfiguration # -#-------------------# +##----------------## +# Pre-Config # +##----------------## +sed -i 's/PermitRootLogin yes/PermitRootLogin prohibit-password/g' /etc/ssh/sshd_config +echo "root:$password" | chpasswd cd /tmp +mv /boot/grub/menu.lst /boot/grub/menu.lst.bck apt update apt upgrade -y apt dist-upgrade -y @@ -128,22 +116,22 @@ ufw allow 80/tcp ufw limit ssh echo "y" | sudo ufw enable -#-------------------# -# Install Phase # -#-------------------# +##-------------------## +# Install Phase # +##-------------------## -echo "***************************" +echo "****************************" sleep 0.5 -echo "INSTALLATIE DUURT 5 Minuten" +echo "Installatie duurt 5 minuten." sleep 0.5 -echo "***************************" +echo "****************************" -wget $script -O script.sh -source script.sh +wget $script -O Ubuntu-Web_Installer.sh +source Ubuntu-Web_Installer.sh -#-------------------# -# MYSQL SETTINGS # -#-------------------# +##------------------## +# MySQL Config # +##------------------## rm /etc/mysql/my.cnf cat > /etc/mysql/my.cnf <<- "EOF" @@ -182,18 +170,17 @@ log_error = /var/log/mysql/error.log expire_logs_days = 10 max_binlog_size = 100M EOF +echo "Installatie geslaagd!" -#--------------# +##------------## # Reboot # -#--------------# +##------------## -echo "Install Succes" -echo "Reboot system in:" +echo "Reboot in:" sleep 1 echo 3 sleep 1 echo 2 sleep 1 echo 1 -reboot -exit \ No newline at end of file +reboot \ No newline at end of file