diff options
author | startxfr <clarue@startx.fr> | 2014-12-05 19:19:40 +0100 |
---|---|---|
committer | startxfr <clarue@startx.fr> | 2014-12-05 19:19:40 +0100 |
commit | 33c861af09aa7a8758716b16c12b7085c2c6283a (patch) | |
tree | c3b131a34b1d953b69e2b8a78e573296f5e63c89 /Services/mariadb/sx/mariadb.sh | |
parent | de3cd0a17a285afa0dd783ec11024c992f4aa3ff (diff) | |
download | phpmyadmin-33c861af09aa7a8758716b16c12b7085c2c6283a.tar.gz phpmyadmin-33c861af09aa7a8758716b16c12b7085c2c6283a.tar.bz2 phpmyadmin-33c861af09aa7a8758716b16c12b7085c2c6283a.tar.xz phpmyadmin-33c861af09aa7a8758716b16c12b7085c2c6283a.zip |
fin des modifications sur le template mariadb
Diffstat (limited to 'Services/mariadb/sx/mariadb.sh')
-rw-r--r-- | Services/mariadb/sx/mariadb.sh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Services/mariadb/sx/mariadb.sh b/Services/mariadb/sx/mariadb.sh index af6124b..5b2857d 100644 --- a/Services/mariadb/sx/mariadb.sh +++ b/Services/mariadb/sx/mariadb.sh @@ -88,11 +88,11 @@ function update_rootuser { # Find all sqlfiles in /tmp/ and import then using admin user function import_sqlfiles { - local filedir=$1; local p=$MARIADB_ROOTPWD; + local filedir=$1; local p=$MARIADB_ROOTPWD; local del=$2; if [ "$(ls -1 $filedir | wc -l)" -ge "1" ]; then echo "=> Found SQL files to import ..." for filename in "$filedir"; do - import_sqlfile $filename + import_sqlfile $filename $del done; fi; return 0 @@ -100,10 +100,14 @@ function import_sqlfiles { # Find all sqlfiles in /tmp/ and import then using admin user function import_sqlfile { - local filename=$1; local p=$MARIADB_ROOTPWD; + local filename=$1; local p=$MARIADB_ROOTPWD; local del=$2; if [ -f "$filename" ]; then echo "===> Importing sql file : $filename" mysql -u root -p$p < $filename + if [ "$del" = "delete"]; then + rm -f $filename + echo "====> Deleting $filename after import" + fi; else echo "====> Could not find sql file $filename. Skip import..." fi; |