Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- distr=$(cat /etc/os-release | grep -m 1 '^ID')
- echo "Update system before install VestaCP?(y/n)"
- read updating
- if [ "$updating" = "y" ]; then
- case $distr in
- ID=ubuntu)
- apt update
- apt upgrade -y
- ;;
- ID=centos)
- yum install -y epel-release
- yum update -y
- ;;
- ID=debian)
- apt update
- apt upgrade -y
- ;;
- esac
- else
- echo "Skip updating"
- fi
- echo "Installing VestaCP, continue?(y/n)"
- read choice
- if [ "$choice" = "y" ]; then
- echo "Select engine:"
- echo "1 nginx+php-fpm"
- echo "2 nginx+apache"
- echo "3 apache"
- echo "4 no"
- echo "5 interactive mode"
- read engine
- cd /tmp
- case $engine in
- 1)
- curl -O http://vestacp.com/pub/vst-install.sh
- bash vst-install.sh --nginx yes --phpfpm yes --apache no --named yes --remi yes --vsftpd yes --proftpd no --iptables yes --fail2ban yes --quota no --exim yes --dovecot yes --spamassassin yes --clamav no --softaculous no --mysql yes --postgresql no --hostname $HOSTNAME --interactive no --email admin@$HOSTNAME
- ;;
- 2)
- curl -O http://vestacp.com/pub/vst-install.sh
- bash vst-install.sh --nginx yes --apache yes --phpfpm no --named yes --remi yes --vsftpd yes --proftpd no --iptables yes --fail2ban yes --quota no --exim yes --dovecot yes --spamassassin yes --clamav no --softaculous no --mysql yes --postgresql no --hostname $HOSTNAME --interactive no --email admin@$HOSTNAME
- ;;
- 3)
- curl -O http://vestacp.com/pub/vst-install.sh
- bash vst-install.sh --nginx no --apache yes --phpfpm no --named yes --remi yes --vsftpd yes --proftpd no --iptables yes --fail2ban yes --quota no --exim yes --dovecot yes --spamassassin yes --clamav no --softaculous no --mysql yes --postgresql no --hostname $HOSTNAME --interactive no --email admin@$HOSTNAME
- ;;
- 4)
- curl -O http://vestacp.com/pub/vst-install.sh
- bash vst-install.sh --nginx no --apache no --phpfpm no --named yes --remi yes --vsftpd yes --proftpd no --iptables yes --fail2ban yes --quota no --exim yes --dovecot yes --spamassassin yes --clamav no --softaculous no --mysql yes --postgresql no --hostname $HOSTNAME --interactive no --email admin@$HOSTNAME
- ;;
- 5)
- echo "Write the arguments for interactive install (for example -n yes -w yes ...)"
- echo "Don't install ClamAV with Exim, because your mailserver will not work"
- echo " -a, --apache Install Apache [yes|no] default: yes"
- echo " -n, --nginx Install Nginx [yes|no] default: yes"
- echo " -w, --phpfpm Install PHP-FPM [yes|no] default: no"
- echo " -v, --vsftpd Install Vsftpd [yes|no] default: yes"
- echo " -j, --proftpd Install ProFTPD [yes|no] default: no"
- echo " -k, --named Install Bind [yes|no] default: yes"
- echo " -m, --mysql Install MySQL [yes|no] default: yes"
- echo " -g, --postgresql Install PostgreSQL [yes|no] default: no"
- echo " -x, --exim Install Exim [yes|no] default: yes"
- echo " -z, --dovecot Install Dovecot [yes|no] default: yes"
- echo " -c, --clamav Install ClamAV [yes|no] default: yes"
- echo " -t, --spamassassin Install SpamAssassin [yes|no] default: yes"
- echo " -i, --iptables Install Iptables [yes|no] default: yes"
- echo " -b, --fail2ban Install Fail2ban [yes|no] default: yes"
- echo " -o, --softaculous Install Softaculous [yes|no] default: yes"
- echo " -q, --quota Filesystem Quota [yes|no] default: no"
- echo " -l, --lang Default language default: en"
- echo " -y, --interactive Interactive install [yes|no] default: yes"
- echo " -s, --hostname Set hostname"
- echo " -e, --email Set admin email"
- echo " -p, --password Set admin password"
- echo " -f, --force Force installation"
- echo " -h, --help Print this help"
- read arguments
- curl -O http://vestacp.com/pub/vst-install.sh
- bash vst-install.sh "$arguments"
- ;;
- esac
- else
- echo "Aborted"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement