inject_user_key routine fixes
[osm/RO.git] / database_utils / dump_db.sh
index 3c94d31..89c83f0 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 ##
-# Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U.
+# Copyright 2015 Telefonica Investigacion y Desarrollo, S.A.U.
 # This file is part of openmano
 # All Rights Reserved.
 #
@@ -23,7 +23,7 @@
 
 
 LICENSE_HEAD='/**
-* Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U.
+* Copyright 2017 Telefonica Investigacion y Desarrollo, S.A.U.
 * This file is part of openmano
 * All Rights Reserved.
 *
@@ -54,7 +54,7 @@ DBNAME="mano_db"
 MYSQL=$(which mysql)
 AWK=$(which awk)
 GREP=$(which grep)
-DIRNAME=`dirname $0`
+DIRNAME=`dirname $(readlink -f $0)`
  
 function usage(){
     echo -e "Usage: $0 OPTIONS"
@@ -127,6 +127,7 @@ do
         echo
 done
 
 #echo structure, including the content of schema_version
 echo "$LICENSE_HEAD" > ${DIRNAME}/${DBNAME}_structure.sql
 mysqldump $DBHOST_ $DBPORT_ $DBUSER_ $DBPASS_ --no-data --add-drop-table --add-drop-database --routines --databases $DBNAME >> ${DIRNAME}/${DBNAME}_structure.sql