Skip to content

Commit 0ef19bf

Browse files
committed
added option for disabling remi repo
1 parent 26b96e1 commit 0ef19bf

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

install/vst-install.sh

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ VERSION='0.9.7'
1010
YUM_REPO='/etc/yum.repos.d/vesta.repo'
1111
arch=$(uname -i)
1212

13-
tools="screen mc libpng libjpeg curl curl libmcrypt libmcrypt mhash mhash
14-
freetype openssl flex libxml2 ImageMagick sqlite sqlite pcre pcre sudo bc
15-
mailx lsof ntp tar whois telnet rsync"
13+
tools="screen mc libpng libjpeg curl libmcrypt mhash zip unzip freetype ntp
14+
openssl flex libxml2 ImageMagick sqlite pcre sudo bc jwhois mailx lsof
15+
tar telnet rsync"
1616

1717
rpms="nginx httpd mod_ssl mod_ruid2 mod_extract_forwarded mod_fcgid ftp
1818
webalizer awstats mysql mysql-server php php-bcmath php-cli php-common
@@ -40,6 +40,7 @@ release=$(grep -o "[0-9]" /etc/redhat-release |head -n1)
4040

4141
help() {
4242
echo "usage: $0 [OPTIONS]
43+
-d, --disable-remi Disable remi
4344
-e, --email Define email address
4445
-h, --help Print this help and exit
4546
-f, --force Force installation"
@@ -51,6 +52,7 @@ for arg; do
5152
delim=""
5253
case "$arg" in
5354
--help) args="${args}-h " ;;
55+
--disable-remi) args="${args}-d " ;;
5456
--force) args="${args}-f " ;;
5557
--email) args="${args}-e " ;;
5658
*) [[ "${arg:0:1}" == "-" ]] || delim="\""
@@ -60,8 +62,9 @@ done
6062
eval set -- "$args"
6163

6264
# Getopt
63-
while getopts "hfe:" Option; do
65+
while getopts "dhfe:" Option; do
6466
case $Option in
67+
d) disable_remi='yes' ;; # Disable remi repo
6568
h) help ;; # Help
6669
e) email=$OPTARG ;; # Contact email
6770
f) force=yes ;; # Force install
@@ -249,8 +252,12 @@ if [ -e '/root/.my.cnf' ]; then
249252
mv -f /root/.my.cnf
250253
fi
251254

252-
# Vesta packages
253-
yum -y --enablerepo=remi install $rpms
255+
# Install Vesta packages
256+
if [ -z "$disable_remi" ]; then
257+
yum -y --enablerepo=remi install $rpms
258+
else
259+
yum -y install $rpms
260+
fi
254261
if [ $? -ne 0 ]; then
255262
echo 'Error: yum install failed'
256263
exit 1
@@ -501,6 +508,8 @@ sed -i "s/%blowfish_secret%/$(gen_pass)/g" /etc/phpMyAdmin/config.inc.php
501508
wget $CHOST/$VERSION/httpd-webmail.conf -O /etc/httpd/conf.d/roundcubemail.conf
502509
wget $CHOST/$VERSION/roundcube-main.conf -O /etc/roundcubemail/main.inc.php
503510
wget $CHOST/$VERSION/roundcube-db.conf -O /etc/roundcubemail/db.inc.php
511+
wget $CHOST/$VERSION/roundcube-driver.php -O /usr/share/roundcubemail/plugins/password/vesta.php
512+
wget $CHOST/$VERSION/roundcube-pw.conf -O /usr/share/roundcubemail/plugins/password/config.inc.php
504513

505514
r="$(gen_pass)"
506515
mysql -e "CREATE DATABASE roundcube"

0 commit comments

Comments
 (0)