From b2d85db41fe8d4e609361921c037576d0c4aba73 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Fri, 25 Jul 2014 17:04:51 +0530 Subject: [PATCH] Added error handling --- src/vendor/ee_ven_setup_roundcube.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/vendor/ee_ven_setup_roundcube.sh b/src/vendor/ee_ven_setup_roundcube.sh index 1fcea8d8..eeddaa20 100644 --- a/src/vendor/ee_ven_setup_roundcube.sh +++ b/src/vendor/ee_ven_setup_roundcube.sh @@ -11,16 +11,18 @@ function ee_mod_setup_roundcube() mysql -e "create database \`roundcubemail\`" \ || ee_lib_error "Unable to create Roundcube database, exit status = " $? - # Create MySQL User + # Create MySQL user mysql -e "grant all privileges on roundcubemail.* to roundcube@'$EE_MYSQL_HOST' IDENTIFIED BY '$ee_random'" \ || ee_lib_error "Unable to grant privileges for Roundcube database user, exit status = " $? mysql -e "flush privileges" - # Import Roundcube intial database + # Import Roundcube initial database mysql roundcubemail < /var/www/roundcubemail/htdocs/SQL/mysql.initial.sql \ || ee_lib_error "Unable to import database for Roundcube, exit status = " $? # Setup configuration for Roundcube cp -av /var/www/roundcubemail/htdocs/config/config.inc.php.sample /var/www/roundcubemail/htdocs/config/config.inc.php - sed -i "s'mysql://roundcube:password@localhost/roundcubemail'mysql://roundcube:${ee_random}@${EE_MYSQL_HOST}/roundcubemail'" /var/www/roundcubemail/htdocs/config/config.inc.php + sed -i "s'mysql://roundcube:password@localhost/roundcubemail'mysql://roundcube:${ee_random}@${EE_MYSQL_HOST}/roundcubemail'" /var/www/roundcubemail/htdocs/config/config.inc.php \ + || ee_lib_error "Unable to setup Roundcube database details in config.inc.php file, exit status = " $? + }