@@ -9,9 +9,12 @@ export PATH=$PATH:/sbin
99export DEBIAN_FRONTEND=noninteractive
1010RHOST=' apt.vestacp.com'
1111CHOST=' c.vestacp.com'
12- REPO=' raring'
1312VERSION=' 0.9.8/ubuntu'
14- arch=$( arch)
13+ if [ " $( arch) " != ' x86_64' ]; then
14+ arch=' i386'
15+ else
16+ arch=" amd64"
17+ fi
1518os=$( head -n 1 /etc/issue | cut -f 1 -d ' ' )
1619release=$( head -n 1 /etc/issue | cut -f 2 -d ' ' )
1720codename=$( lsb_release -cs)
@@ -24,7 +27,6 @@ software="nginx apache2 apache2-utils apache2.2-common apache2-suexec-custom
2427 spamassassin roundcube roundcube-mysql roundcube-plugins apparmor-utils
2528 rrdtool vesta vesta-nginx vesta-php"
2629
27-
2830help () {
2931 echo " usage: $0 [OPTIONS]
3032 -e, --email Define email address
@@ -88,8 +90,9 @@ if [ -e '/etc/redhat-release' ]; then
8890fi
8991
9092# Check supported OS
91- if [ $os != ' Ubuntu' ] && [ $os != ' Debian' ]; then
92- echo ' Error: sorry, this installer can work only on Debian or Ubuntu'
93+ if [ $codename != ' precise' ] && [ $codename != ' raring' ]; then
94+ echo ' Error: only Ubuntu LTS 12.04 and Ubuntu 13.04 is supported'
95+ exit 1
9396fi
9497
9598# Check wget
104107# Check repo availability
105108wget -q " $CHOST /$VERSION /vesta.conf" -O /dev/null
106109if [ $? -ne 0 ]; then
107- echo " Error: no access to $REPO repository"
110+ echo " Error: no access to repository"
108111 exit 1
109112fi
110113
@@ -525,6 +528,12 @@ tar -xzf dovecot-conf.d.tar.gz
525528rm -f dovecot-conf.d.tar.gz
526529chown -R root:root /etc/dovecot
527530gpasswd -a dovecot mail
531+ if [ " $codename " = ' precise' ]; then
532+ dovecot_ssl_conf=" /etc/dovecot/conf.d/10-ssl.conf"
533+ echo " ssl = yes" > $dovecot_ssl_conf
534+ echo " ssl_cert = </etc/ssl/certs/dovecot.pem" >> $dovecot_ssl_conf
535+ echo " ssl_key = </etc/ssl/private/dovecot.pem" >> $dovecot_ssl_conf
536+ fi
528537update-rc.d dovecot defaults
529538service dovecot stop > /dev/null 2>&1
530539service dovecot start
@@ -657,7 +666,7 @@ if [ ! -z "$(grep ^admin: /etc/passwd)" ] && [ "$force" = 'yes' ]; then
657666 mv -f /home/admin $vst_backups /home/
658667 rm -f /tmp/sess_*
659668fi
660- if [ ! -z " $( grep ^admin: /etc/group) " ] && [ " $force " = ' yes ' ] ; then
669+ if [ ! -z " $( grep ^admin: /etc/group) " ]; then
661670 groupdel admin > /dev/null 2>&1
662671fi
663672vpass=$( gen_pass)
779788cd
780789bash
781790
782- # EOF
791+ # EOF
0 commit comments