Skip to content

Commit 6bd2b3a

Browse files
committed
Support for Ubuntu 12.04 LTS
1 parent b736f74 commit 6bd2b3a

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

install/vst-install-ubuntu.sh

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@ export PATH=$PATH:/sbin
99
export DEBIAN_FRONTEND=noninteractive
1010
RHOST='apt.vestacp.com'
1111
CHOST='c.vestacp.com'
12-
REPO='raring'
1312
VERSION='0.9.8/ubuntu'
14-
arch=$(arch)
13+
if [ "$(arch)" != 'x86_64' ]; then
14+
arch='i386'
15+
else
16+
arch="amd64"
17+
fi
1518
os=$(head -n 1 /etc/issue | cut -f 1 -d ' ')
1619
release=$(head -n 1 /etc/issue | cut -f 2 -d ' ' )
1720
codename=$(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-
2830
help() {
2931
echo "usage: $0 [OPTIONS]
3032
-e, --email Define email address
@@ -88,8 +90,9 @@ if [ -e '/etc/redhat-release' ]; then
8890
fi
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
9396
fi
9497

9598
# Check wget
@@ -104,7 +107,7 @@ fi
104107
# Check repo availability
105108
wget -q "$CHOST/$VERSION/vesta.conf" -O /dev/null
106109
if [ $? -ne 0 ]; then
107-
echo "Error: no access to $REPO repository"
110+
echo "Error: no access to repository"
108111
exit 1
109112
fi
110113

@@ -525,6 +528,12 @@ tar -xzf dovecot-conf.d.tar.gz
525528
rm -f dovecot-conf.d.tar.gz
526529
chown -R root:root /etc/dovecot
527530
gpasswd -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
528537
update-rc.d dovecot defaults
529538
service dovecot stop > /dev/null 2>&1
530539
service 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_*
659668
fi
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
662671
fi
663672
vpass=$(gen_pass)
@@ -779,4 +788,4 @@ echo
779788
cd
780789
bash
781790

782-
# EOF
791+
#EOF

0 commit comments

Comments
 (0)