Upload files to 'Extra_Domains'
Moeten nog een aantal dingen veranderd worden, waaronder Postfix(moet nog domein specifiek gemaakt worden)
This commit is contained in:
114
Extra_Domains/Domain_Installer.sh
Normal file
114
Extra_Domains/Domain_Installer.sh
Normal file
@@ -0,0 +1,114 @@
|
||||
#!/bin/bash
|
||||
###============================================================
|
||||
## Ubuntu 18.04 Additional Domain Installer
|
||||
###============================================================
|
||||
## Zet comments hieronder:
|
||||
#
|
||||
#
|
||||
#
|
||||
##=============================================================
|
||||
|
||||
##----------##
|
||||
# Menu #
|
||||
##----------##
|
||||
|
||||
echo "Ubuntu 18.04 extra domein installatie script."
|
||||
echo "Domein zonder www:"
|
||||
read domain
|
||||
echo "Algemeen wachtwoord:"
|
||||
read password
|
||||
echo "Administrator email:"
|
||||
read email
|
||||
echo "Webserver:"
|
||||
PS3='Keuze:'
|
||||
options=("Apache" "Apache, Nginx reverse proxy" "Nginx, PHP-FPM" "Quit")
|
||||
select opt in "${options[@]}"
|
||||
do
|
||||
case $opt in
|
||||
"Apache")
|
||||
script=temp_filler
|
||||
break;;
|
||||
"Apache, Nginx reverse proxy")
|
||||
script=temp_filler
|
||||
break;;
|
||||
"Nginx, PHP-FPM")
|
||||
script=temp_filler
|
||||
break;;
|
||||
"Quit")
|
||||
exit;;
|
||||
*) echo "Fout commando $REPLY";;
|
||||
esac
|
||||
done
|
||||
|
||||
#while true; do
|
||||
# read -p "Installeer Netdata -> yes/no?" yn
|
||||
# case $yn in
|
||||
# [Yy]* ) netdata=1
|
||||
# break;;
|
||||
# [Nn]* ) netdata=0
|
||||
# break;;
|
||||
# * ) echo "Kies yes of no.";;
|
||||
# esac
|
||||
#done
|
||||
|
||||
#while true; do
|
||||
# read -p "Installeer Memcached -> yes/no?" yn
|
||||
# case $yn in
|
||||
# [Yy]* ) memcached=1
|
||||
# break;;
|
||||
# [Nn]* ) memcached=0
|
||||
# break;;
|
||||
# * ) echo "Kies yes of no.";;
|
||||
# esac
|
||||
#done
|
||||
|
||||
#while true; do
|
||||
# read -p "Installeer Redis Cache -> yes/no?" yn
|
||||
# case $yn in
|
||||
# [Yy]* ) redis=1
|
||||
# break;;
|
||||
# [Nn]* ) redis=0
|
||||
# break;;
|
||||
# * ) echo "Kies yes of no.";;
|
||||
# esac
|
||||
#done
|
||||
|
||||
while true; do
|
||||
read -p "Installeer Wordpress -> yes/no?" yn
|
||||
case $yn in
|
||||
[Yy]* ) wordpress=1
|
||||
break;;
|
||||
[Nn]* ) wordpress=0
|
||||
break;;
|
||||
* ) echo "Kies yes of no.";;
|
||||
esac
|
||||
done
|
||||
|
||||
##----------------##
|
||||
# Pre-Config #
|
||||
##----------------##
|
||||
|
||||
cd /tmp
|
||||
# Make sure all repositories and packages are up-to-date
|
||||
apt update
|
||||
apt upgrade -y
|
||||
apt dist-upgrade -y
|
||||
apt clean
|
||||
apt autoremove -y
|
||||
# Setup domain folder
|
||||
mkdir -p /var/www/"$domain"/html
|
||||
|
||||
##-------------------##
|
||||
# Install Phase #
|
||||
##-------------------##
|
||||
|
||||
echo "****************************"
|
||||
sleep 0.5
|
||||
echo "Installatie duurt 5 minuten."
|
||||
sleep 0.5
|
||||
echo "****************************"
|
||||
|
||||
wget $script -O Ubuntu-Domain_Installer.sh
|
||||
source Ubuntu-Domain_Installer.sh
|
||||
|
||||
echo "Installatie geslaagd!"
|
||||
Reference in New Issue
Block a user