Skip to content

Commit c2f4595

Browse files
committed
Added Ubuntu 13.10 support
1 parent b6cc3a8 commit c2f4595

File tree

2 files changed

+37
-12
lines changed

2 files changed

+37
-12
lines changed

install/vst-install-ubuntu.sh

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export DEBIAN_FRONTEND=noninteractive
1010
RHOST='apt.vestacp.com'
1111
CHOST='c.vestacp.com'
1212
VERSION='0.9.8/ubuntu'
13-
software="nginx apache2 apache2-utils apache2.2-common apache2-suexec-custom
13+
software="nginx apache2 apache2-utils apache2-suexec-custom
1414
libapache2-mod-ruid2 libapache2-mod-rpaf libapache2-mod-fcgid bind9 idn
1515
mysql-server mysql-common mysql-client php5-common php5-cgi php5-mysql
1616
php5-curl libapache2-mod-php5 vsftpd mc exim4 exim4-daemon-heavy
@@ -89,13 +89,9 @@ else
8989
fi
9090
os=$(head -n 1 /etc/issue | cut -f 1 -d ' ')
9191
release=$(head -n 1 /etc/issue | cut -f 2 -d ' ' )
92-
if [ -e "/usr/bin/lsb_release" ]; then
93-
codename=$(lsb_release -cs)
94-
else
95-
codename='unknown'
96-
fi
97-
if [ $codename != 'precise' ] && [ $codename != 'raring' ]; then
98-
echo 'Error: only Ubuntu LTS 12.04 and Ubuntu 13.04 is supported'
92+
codename=$(lsb_release -cs | grep "[precise|raring|saucy]")
93+
if [ -z "$codename" ]; then
94+
echo 'Error: only Ubuntu 12.04, 13.04 and 13.10 is supported'
9995
exit 1
10096
fi
10197

@@ -256,6 +252,9 @@ apt=/etc/apt/sources.list.d
256252
echo "deb http://nginx.org/packages/ubuntu/ $codename nginx" > $apt/nginx.list
257253
wget http://nginx.org/keys/nginx_signing.key -O /tmp/nginx_signing.key
258254
apt-key add /tmp/nginx_signing.key
255+
if [ $codename = 'saucy' ]; then
256+
sed -i "s/saucy/raring/g" $apt/nginx.list
257+
fi
259258

260259
# Install vesta repo
261260
echo "deb http://$RHOST/$codename/ $codename vesta" > $apt/vesta.list
@@ -451,14 +450,18 @@ fi
451450

452451
# Apache configuration
453452
wget $CHOST/$VERSION/apache2.conf -O /etc/apache2/apache2.conf
453+
if [ "$codename" = 'saucy' ]; then
454+
sed -i "/^LockFile /d" /etc/apache2/apache2.conf
455+
fi
454456
wget $CHOST/$VERSION/apache2-status.conf \
455457
-O /etc/apache2/mods-enabled/status.conf
456458
wget $CHOST/$VERSION/apache2.log -O /etc/logrotate.d/apache2
459+
echo "# Powever by vesta" > /etc/apache2/sites-available/default
460+
echo "# Powever by vesta" > /etc/apache2/sites-available/default-ssl
461+
echo "# Powever by vesta" > /etc/apache2/ports.conf
462+
mkdir -p /etc/apache2/conf.d
457463
rm -f /etc/apache2/conf.d/vesta.conf
458464
echo > /etc/apache2/conf.d/vesta.conf
459-
echo "# Powever by vesta" > /etc/apache2/sites-available/default
460-
echo "# Powever by vestas" > /etc/apache2/sites-available/default-ssl
461-
echo "# Powever by vestas" > /etc/apache2/ports.conf
462465
touch /var/log/apache2/access.log
463466
touch /var/log/apache2/error.log
464467
mkdir -p /var/log/apache2/domains
@@ -467,7 +470,6 @@ chmod 640 /var/log/apache2/access.log
467470
chmod 640 /var/log/apache2/error.log
468471
chmod 751 /var/log/apache2/domains
469472
a2enmod rewrite
470-
a2enmod actions
471473
a2enmod suexec
472474
echo -e "/home\npublic_html/cgi-bin" > /etc/apache2/suexec/www-data
473475
update-rc.d apache2 defaults
@@ -604,6 +606,11 @@ fi
604606
# php configuration
605607
sed -i "s/;date.timezone =/date.timezone = UTC/g" /etc/php5/apache2/php.ini
606608
sed -i "s/;date.timezone =/date.timezone = UTC/g" /etc/php5/cli/php.ini
609+
if [ "$codename" = 'saucy' ]; then
610+
ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available
611+
php5enmod mcrypt
612+
service apache2 restart
613+
fi
607614

608615
# phpMyAdmin configuration
609616
wget $CHOST/$VERSION/apache2-pma.conf -O /etc/phpmyadmin/apache.conf
@@ -624,6 +631,12 @@ mysql -e "CREATE DATABASE roundcube"
624631
mysql -e "GRANT ALL ON roundcube.* TO roundcube@localhost IDENTIFIED BY '$r'"
625632
sed -i "s/%password%/$r/g" /etc/roundcube/db.inc.php
626633
mysql roundcube < /usr/share/dbconfig-common/data/roundcube/install/mysql
634+
if [ "$codename" = 'saucy' ]; then
635+
wget $CHOST/$VERSION/roundcube-driver-new.php -O \
636+
/usr/share/roundcube/plugins/password/drivers/vesta.php
637+
ln -s /etc/roundcube/apache.conf /etc/apache2/conf.d/
638+
service apache2 restart
639+
fi
627640

628641
# Vesta configuration
629642
echo "export VESTA='/usr/local/vesta'" > /etc/profile.d/vesta.sh
@@ -678,6 +691,10 @@ cd /usr/local/vesta/data
678691
wget $CHOST/$VERSION/templates.tar.gz -O templates.tar.gz
679692
tar -xzf templates.tar.gz
680693
rm -f templates.tar.gz
694+
if [ "$codename" = 'saucy' ]; then
695+
sed -i "s/Include /IncludeOptional /g" \
696+
$VESTA/data/templates/web/apache2/*tpl
697+
fi
681698
chmod -R 755 /usr/local/vesta/data/templates
682699
cp templates/web/skel/public_html/index.html /var/www/
683700
sed -i 's/%domain%/It worked!/g' /var/www/index.html

install/vst-install.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
# Vesta installation wrapper
33
# http://vestacp.com
44

5+
#
6+
# Currently Supported Operating Systems:
7+
#
8+
# RHEL 5, RHEL 6
9+
# CentOS 5, CentOS 6
10+
# Debian 7
11+
# Ubuntu LTS, Ubuntu 13.04, Ubuntu 13.10
12+
#
513

614
# Am I root?
715
if [ "x$(id -u)" != 'x0' ]; then

0 commit comments

Comments
 (0)