From c23f2cdcda93f260e26781dfa59dfe2b89c77402 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Fri, 20 Jul 2018 20:27:49 -0500 Subject: Client Config & Cert Documentation Issue-ID: AAF-378 Change-Id: Ic0c05803551f1874b230c5c9e031b5bf5ff03599 Signed-off-by: Instrumental --- auth/auth-cass/src/main/cql/pull.sh | 9 +++++++-- auth/auth-cass/src/main/cql/push.sh | 11 +++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) (limited to 'auth/auth-cass/src/main/cql') diff --git a/auth/auth-cass/src/main/cql/pull.sh b/auth/auth-cass/src/main/cql/pull.sh index f4db573a..01fa52bf 100644 --- a/auth/auth-cass/src/main/cql/pull.sh +++ b/auth/auth-cass/src/main/cql/pull.sh @@ -1,5 +1,10 @@ -for T in x509 ns_attrib config cred user_role perm role artifact ns; do +mkdir -p dats +cd dats +for T in ns ns_attrib cred user_role perm role config artifact ; do cqlsh -e "use authz; COPY $T TO '$T.dat' WITH DELIMITER='|';" done -tar -cvzf dat.gz *.dat +tar -cvzf ../dat.gz *.dat +rm *.dat +cd - +rmdir dats diff --git a/auth/auth-cass/src/main/cql/push.sh b/auth/auth-cass/src/main/cql/push.sh index 8026c9f9..330326d5 100644 --- a/auth/auth-cass/src/main/cql/push.sh +++ b/auth/auth-cass/src/main/cql/push.sh @@ -1,5 +1,8 @@ -tar -xvf dat.gz -for T in x509 ns_attrib config cred user_role perm role artifact ns; do - cqlsh -e "use authz; COPY $T FROM '$T.dat' WITH DELIMITER='|';" +mkdir -p dats +cd dats +tar -xvf ../dat.gz +for T in $(ls *.dat); do + cqlsh -e "use authz; COPY ${T%.dat} FROM '$T' WITH DELIMITER='|';" done - +cd - +rm -Rf dats -- cgit 1.2.3-korg