From fee11ca777397a693307912643b31c89fe642602 Mon Sep 17 00:00:00 2001 From: myvesta <38690722+myvesta@users.noreply.github.com> Date: Sun, 19 Dec 2021 01:56:35 +0100 Subject: [PATCH] Update install-new-roundcube.sh --- src/deb/for-download/tools/install-new-roundcube.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/deb/for-download/tools/install-new-roundcube.sh b/src/deb/for-download/tools/install-new-roundcube.sh index 42ac73a0..95e1d1cd 100644 --- a/src/deb/for-download/tools/install-new-roundcube.sh +++ b/src/deb/for-download/tools/install-new-roundcube.sh @@ -120,6 +120,9 @@ DB_EXISTS=$(check_if_database_exists "$USER" "$DATABASE_NAME") if [ "$DB_EXISTS" = "no" ]; then echo "== Creating database: $DATABASE_NAME" /usr/local/vesta/bin/v-add-database "$USER" "$DATABASE_NAME_WITHOUT_PREFIX" "$DATABASE_NAME_WITHOUT_PREFIX" "$DATABASE_PASSWORD" 'mysql' 'localhost' 'utf8' +else + echo "== Database $DATABASE_NAME already exists, and it's maybe used by another site. I will not continue. Please edit this script and enter other database name." + exit 1 fi if [ -f "/usr/local/vesta/data/templates/web/apache2/PHP-FPM-73.tpl" ]; then @@ -167,7 +170,10 @@ echo "\$config['session_lifetime'] = 1080;" >> /home/$USER/web/$DOMAIN/public_ht fix_ownership -sed -i "s||

$LOGINMESSAGE1
$LOGINMESSAGE2


\n\n|g" /usr/share/roundcube/skins/larry/templates/login.html +check_grep=$(grep -c 'color: white; font-size: 12pt' /usr/share/roundcube/skins/larry/templates/login.html) +if [ "$check_grep" -eq 0 ]; then + sed -i "s||

$LOGINMESSAGE1
$LOGINMESSAGE2


\n\n|g" /usr/share/roundcube/skins/larry/templates/login.html +fi echo "-------------------------------------"