From 7e43b4a6dd512e6432f31346d1c3b24c42ecb37c Mon Sep 17 00:00:00 2001 From: Bram Prieshof Date: Fri, 7 Sep 2018 09:43:27 +0000 Subject: [PATCH] Update 'Main-Installer_V0.1.sh' --- Main-Installer_V0.1.sh | 78 +++++++++++++++++++++++++++--------------- 1 file changed, 50 insertions(+), 28 deletions(-) diff --git a/Main-Installer_V0.1.sh b/Main-Installer_V0.1.sh index f971529..806802a 100644 --- a/Main-Installer_V0.1.sh +++ b/Main-Installer_V0.1.sh @@ -23,11 +23,9 @@ # > Postfix #============================================================================== -#-------------------# -# Preconfiguration # -#-------------------# - -cd /tmp +#------# +# Menu # +#------# echo "UBUNTU 18.04 INSTALLATIE SCRIPT" echo Welk domein mag gekoppeld worden? Typ domein zonder www @@ -36,24 +34,6 @@ echo Standaard wachtwoord read passwd echo administrator email read email -apt-get update -apt-get upgrade -y -apt-get dist-upgrade -y -apt-get clean -apt-get autoremove -y -hostnamectl set-hostname $domain -sed -i 's/;preserve_hostname: false/preserve_hostname: true/g' /etc/cloud/cloud.cfg -timedatectl set-timezone Europe/Amsterdam -sed -i 's/#/vm.swappiness=10/g' /etc/sysctl.conf -sed -i 's/#/vm.vfs_cache_pressure=50/g' /etc/sysctl.conf -apt install rsync grsync sshpass -y -touch /etc/cron.d/updates -cat < /etc/cron.d/updates -SHELL=/bin/sh -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -# m h dom mon dow command -0 0 * * * apt-get update -y && apt-get upgrade -y &&apt-get dist-upgrade -y -EOF echo "Webserver:" PS3='Keuze:' options=("Apache" "Apache, Nginx reverse proxy" "Nginx, PHP-FPM" "Quit") @@ -71,7 +51,7 @@ do break;; "Quit") exit;; - *) echo "Fout antwoord $REPLY";; + *) echo "Fout commando $REPLY";; esac done @@ -119,6 +99,30 @@ while true; do esac done +#-------------------# +# Preconfiguration # +#-------------------# + +cd /tmp +apt-get update +apt-get upgrade -y +apt-get dist-upgrade -y +apt install rsync grsync sshpass -y +apt-get clean +apt-get autoremove -y +hostnamectl set-hostname $domain +sed -i 's/;preserve_hostname: false/preserve_hostname: true/g' /etc/cloud/cloud.cfg +timedatectl set-timezone Europe/Amsterdam +sed -i 's/#/vm.swappiness=10/g' /etc/sysctl.conf +sed -i 's/#/vm.vfs_cache_pressure=50/g' /etc/sysctl.conf +touch /etc/cron.d/updates +cat < /etc/cron.d/updates +SHELL=/bin/sh +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +# m h dom mon dow command +0 0 * * * apt-get update -y && apt-get upgrade -y &&apt-get dist-upgrade -y +EOF + #-------------------# # Install Phase # #-------------------# @@ -132,15 +136,33 @@ echo "***************************" wget $script -O script.sh source script.sh +#-------------------# +# OPCACHE GUI # +#-------------------# +wget https://raw.githubusercontent.com/amnuts/opcache-gui/master/index.php -O /var/www/"$domain"/public_html/opcache.php + +#----------------# +# PHP.info # +#----------------# + +cat > /var/www/"$domain"/public_html/info.php <<- "EOF" + +EOF + +#--------------# +# Reboot # +#--------------# echo "Install Succes" echo "Reboot system in:" sleep 1 -echo "3"a +echo 3 sleep 1 -echo "2" +echo 2 sleep 1 -echo "1" -#reboot +echo 1 +reboot exit \ No newline at end of file