Update 'Main-Installer_V0.1.sh'
This commit is contained in:
@@ -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 <<EOF > /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 <<EOF > /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"
|
||||
<?php
|
||||
phpinfo();
|
||||
?>
|
||||
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
|
||||
Reference in New Issue
Block a user