X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=scripts%2Finstall-openmano.sh;h=9a2e725b113a3426eea1c666043224df89c0effb;hb=12b1f745438a7fcccb397cf189b1a21938e25dbd;hp=48e2a81d9991e7189da41d3a33750b5becf11186;hpb=89b3d840dfa2ae1aae544338fad79cf7703f4af4;p=osm%2FRO.git 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'"