From: tierno Date: Mon, 19 Sep 2016 15:43:53 +0000 (+0000) Subject: minor change at install-openmano.sh script X-Git-Tag: v1.0.0~35 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=12b1f745438a7fcccb397cf189b1a21938e25dbd;p=osm%2FRO.git minor change at install-openmano.sh script Signed-off-by: tierno --- diff --git a/scripts/install-openmano.sh b/scripts/install-openmano.sh index 48e2a81d..9a2e725b 100755 --- a/scripts/install-openmano.sh +++ b/scripts/install-openmano.sh @@ -265,9 +265,7 @@ user=$DBUSER password=$DBPASSWD EOF -db_exists "mano_db" $TEMPFILE -DBEXISTS=$? -if [[ $DBEXISTS -eq 0 ]] ; then +if db_exists "mano_db" $TEMPFILE ; then if [[ -n $FORCEDB ]]; then echo " Deleting previous database mano_db" DBDELETEPARAM="" @@ -284,7 +282,7 @@ if [[ $DBEXISTS -eq 0 ]] ; then echo "Database exists. Use option '--forcedb' to force the deletion of the existing one" && exit 1 fi else - mysqladmin -u$DBUSER $DBPASSWD_PARAM -s create mano_db || ( echo "Error creating mano_db database" && exit 1 ) + mysqladmin -u$DBUSER $DBPASSWD_PARAM -s create mano_db || ! echo "Error creating mano_db database" || exit 1 echo "CREATE USER 'mano'@'localhost' identified by 'manopw';" | mysql --defaults-extra-file=$TEMPFILE -s || ! echo "Failed while creating user mano at database" || exit 1 echo "GRANT ALL PRIVILEGES ON mano_db.* TO 'mano'@'localhost';" | mysql --defaults-extra-file=$TEMPFILE -s || ! echo "Failed while creating user mano at database" || exit 1 echo " Database 'mano_db' created, user 'mano' password 'manopw'"