mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 21:04:07 -07:00
Support for Ubuntu 12.04 LTS
This commit is contained in:
parent
b736f74f69
commit
6bd2b3a80a
1 changed files with 17 additions and 8 deletions
|
@ -9,9 +9,12 @@ export PATH=$PATH:/sbin
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
RHOST='apt.vestacp.com'
|
RHOST='apt.vestacp.com'
|
||||||
CHOST='c.vestacp.com'
|
CHOST='c.vestacp.com'
|
||||||
REPO='raring'
|
|
||||||
VERSION='0.9.8/ubuntu'
|
VERSION='0.9.8/ubuntu'
|
||||||
arch=$(arch)
|
if [ "$(arch)" != 'x86_64' ]; then
|
||||||
|
arch='i386'
|
||||||
|
else
|
||||||
|
arch="amd64"
|
||||||
|
fi
|
||||||
os=$(head -n 1 /etc/issue | cut -f 1 -d ' ')
|
os=$(head -n 1 /etc/issue | cut -f 1 -d ' ')
|
||||||
release=$(head -n 1 /etc/issue | cut -f 2 -d ' ' )
|
release=$(head -n 1 /etc/issue | cut -f 2 -d ' ' )
|
||||||
codename=$(lsb_release -cs)
|
codename=$(lsb_release -cs)
|
||||||
|
@ -24,7 +27,6 @@ software="nginx apache2 apache2-utils apache2.2-common apache2-suexec-custom
|
||||||
spamassassin roundcube roundcube-mysql roundcube-plugins apparmor-utils
|
spamassassin roundcube roundcube-mysql roundcube-plugins apparmor-utils
|
||||||
rrdtool vesta vesta-nginx vesta-php"
|
rrdtool vesta vesta-nginx vesta-php"
|
||||||
|
|
||||||
|
|
||||||
help() {
|
help() {
|
||||||
echo "usage: $0 [OPTIONS]
|
echo "usage: $0 [OPTIONS]
|
||||||
-e, --email Define email address
|
-e, --email Define email address
|
||||||
|
@ -88,8 +90,9 @@ if [ -e '/etc/redhat-release' ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check supported OS
|
# Check supported OS
|
||||||
if [ $os != 'Ubuntu' ] && [ $os != 'Debian' ]; then
|
if [ $codename != 'precise' ] && [ $codename != 'raring' ]; then
|
||||||
echo 'Error: sorry, this installer can work only on Debian or Ubuntu'
|
echo 'Error: only Ubuntu LTS 12.04 and Ubuntu 13.04 is supported'
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check wget
|
# Check wget
|
||||||
|
@ -104,7 +107,7 @@ fi
|
||||||
# Check repo availability
|
# Check repo availability
|
||||||
wget -q "$CHOST/$VERSION/vesta.conf" -O /dev/null
|
wget -q "$CHOST/$VERSION/vesta.conf" -O /dev/null
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Error: no access to $REPO repository"
|
echo "Error: no access to repository"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -525,6 +528,12 @@ tar -xzf dovecot-conf.d.tar.gz
|
||||||
rm -f dovecot-conf.d.tar.gz
|
rm -f dovecot-conf.d.tar.gz
|
||||||
chown -R root:root /etc/dovecot
|
chown -R root:root /etc/dovecot
|
||||||
gpasswd -a dovecot mail
|
gpasswd -a dovecot mail
|
||||||
|
if [ "$codename" = 'precise' ]; then
|
||||||
|
dovecot_ssl_conf="/etc/dovecot/conf.d/10-ssl.conf"
|
||||||
|
echo "ssl = yes" > $dovecot_ssl_conf
|
||||||
|
echo "ssl_cert = </etc/ssl/certs/dovecot.pem" >> $dovecot_ssl_conf
|
||||||
|
echo "ssl_key = </etc/ssl/private/dovecot.pem" >> $dovecot_ssl_conf
|
||||||
|
fi
|
||||||
update-rc.d dovecot defaults
|
update-rc.d dovecot defaults
|
||||||
service dovecot stop > /dev/null 2>&1
|
service dovecot stop > /dev/null 2>&1
|
||||||
service dovecot start
|
service dovecot start
|
||||||
|
@ -657,7 +666,7 @@ if [ ! -z "$(grep ^admin: /etc/passwd)" ] && [ "$force" = 'yes' ]; then
|
||||||
mv -f /home/admin $vst_backups/home/
|
mv -f /home/admin $vst_backups/home/
|
||||||
rm -f /tmp/sess_*
|
rm -f /tmp/sess_*
|
||||||
fi
|
fi
|
||||||
if [ ! -z "$(grep ^admin: /etc/group)" ] && [ "$force" = 'yes' ]; then
|
if [ ! -z "$(grep ^admin: /etc/group)" ]; then
|
||||||
groupdel admin > /dev/null 2>&1
|
groupdel admin > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
vpass=$(gen_pass)
|
vpass=$(gen_pass)
|
||||||
|
@ -779,4 +788,4 @@ echo
|
||||||
cd
|
cd
|
||||||
bash
|
bash
|
||||||
|
|
||||||
# EOF
|
#EOF
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue