Upload files to ''
This commit is contained in:
133
installer.sh
Normal file
133
installer.sh
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
##------------##
|
||||||
|
# Vragen #
|
||||||
|
##------------##
|
||||||
|
echo "Ubuntu 18.04 VestaCP install"
|
||||||
|
echo "Welk domein (zonder WWW) mag gekoppeld worden?"
|
||||||
|
read domain
|
||||||
|
echo "Algemeen wachtwoord"
|
||||||
|
read passwd
|
||||||
|
echo "Administrator email"
|
||||||
|
read email
|
||||||
|
echo "Webserver:"
|
||||||
|
PS3='Keuze:'
|
||||||
|
options=("Apache" "NGINX+apache" "Nginx, PHP-FPM" "Quit")
|
||||||
|
select opt in "${options[@]}"
|
||||||
|
do
|
||||||
|
case $opt in
|
||||||
|
"NGINX+PHP-FPM")
|
||||||
|
webserver="--nginx yes --phpfpm yes --apache no"
|
||||||
|
break;;
|
||||||
|
"NGINX+apache")
|
||||||
|
webserver="--nginx yes --phpfpm no --apache yes"
|
||||||
|
break;;
|
||||||
|
"Apache")
|
||||||
|
webserver="--nginx no --phpfpm no --apache yes"
|
||||||
|
break;;
|
||||||
|
"Quit")
|
||||||
|
exit;;
|
||||||
|
*) echo "Fout commando $REPLY";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "FTPServer:"
|
||||||
|
PS3='Keuze:'
|
||||||
|
options=("vsftpd" "proftpd" "off")
|
||||||
|
select opt in "${options[@]}"
|
||||||
|
do
|
||||||
|
case $opt in
|
||||||
|
"vsftpd")
|
||||||
|
ftp="--vsftpd yes --proftpd no"
|
||||||
|
break;;
|
||||||
|
"proftpd")
|
||||||
|
ftp="--vsftpd no --proftpd yes"
|
||||||
|
break;;
|
||||||
|
"off")
|
||||||
|
ftp="--vsftpd no --proftpd no"
|
||||||
|
break;;
|
||||||
|
*) echo "Fout commando $REPLY";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "MailServer:"
|
||||||
|
PS3='Keuze:'
|
||||||
|
options=("exim" "exim+dovecot" "exim+dovecot+spamassassin" "exim+dovecot+spamassassin+clamav" "Off" )
|
||||||
|
select opt in "${options[@]}"
|
||||||
|
do
|
||||||
|
case $opt in
|
||||||
|
"exim")
|
||||||
|
mail="---exim yes --dovecot no --spamassassin no --clamav no"
|
||||||
|
break;;
|
||||||
|
"exim+dovecot")
|
||||||
|
mail="--exim yes --dovecot yes --spamassassin no --clamav no"
|
||||||
|
break;;
|
||||||
|
"exim+dovecot+spamassassin")
|
||||||
|
mail="--exim yes --dovecot yes --spamassassin no --clamav yes"
|
||||||
|
break;;
|
||||||
|
"exim+dovecot+clamav")
|
||||||
|
mail="--exim yes --dovecot yes --spamassassin no --clamav yes"
|
||||||
|
break;;
|
||||||
|
"exim+dovecot+spamassassin+clamav")
|
||||||
|
mail="--exim yes --dovecot yes --spamassassin no --clamav yes"
|
||||||
|
break;;
|
||||||
|
"Off")
|
||||||
|
mail="--exim no --dovecot no --spamassassin no --clamav no"
|
||||||
|
break;;
|
||||||
|
*) echo "Fout commando $REPLY";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Firewall:"
|
||||||
|
PS3='Keuze:'
|
||||||
|
options=("iptables" "iptables+fail2ban" "Off")
|
||||||
|
select opt in "${options[@]}"
|
||||||
|
do
|
||||||
|
case $opt in
|
||||||
|
"iptables")
|
||||||
|
firewall="--iptables yes --fail2ban no"
|
||||||
|
break;;
|
||||||
|
"iptables+fail2ban")
|
||||||
|
firewall="--iptables yes --fail2ban yes"
|
||||||
|
break;;
|
||||||
|
"Off")
|
||||||
|
firewall="--vsftpd no --proftpd no"
|
||||||
|
break;;
|
||||||
|
*) echo "Fout commando $REPLY";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
read -p "DNS Server -> yes/no?" yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* ) dns="--named yes"
|
||||||
|
break;;
|
||||||
|
[Nn]* ) dns="--named no"
|
||||||
|
break;;
|
||||||
|
* ) echo "Kies yes of no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
read -p "Filesystem Quota -> yes/no?" yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* ) quota="--quota yes"
|
||||||
|
break;;
|
||||||
|
[Nn]* ) quota="--quota no"
|
||||||
|
break;;
|
||||||
|
* ) echo "Kies yes of no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
read -p "Remi repo -> yes/no?" yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* ) remi="--remi yes"
|
||||||
|
break;;
|
||||||
|
[Nn]* ) remi="--remi no"
|
||||||
|
break;;
|
||||||
|
* ) echo "Kies yes of no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
cd /tmp
|
||||||
|
curl -O http://vestacp.com/pub/vst-install.sh
|
||||||
|
bash vst-install.sh "$webserver" "$dns" "$remi" "$ftp" "$firewall" "$quota" "$mail" --softaculous no --mysql yes --postgresql no --hostname "$domain" --email "$email" --password "$passwd" --interactive yes
|
||||||
Reference in New Issue
Block a user