-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
possible fix for: 'unicode' does not have the buffer interface #27
- Loading branch information
Showing
8 changed files
with
42 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
#trap 'echo "rd fail" ; exit 0' EXIT | ||
set -eu | ||
shopt -s nullglob | ||
ARCHIVES=(/storage/*.json) | ||
shopt -u nullglob | ||
|
||
echo "There are ${#ARCHIVES[*]} storage files" | ||
|
||
for file in "${ARCHIVES[@]}" | ||
do | ||
for row in $(cat "${file}" | jq -c .[] | tr -d '^J'); do | ||
_jq() { | ||
echo ${row} | jq -r ${1} | ||
} | ||
echo "Creating key: $(_jq '.key')" | ||
|
||
tmpfile=$(mktemp /tmp/key.XXXXXX) | ||
echo $(_jq '.value') > ${tmpfile} | ||
rd keys create -t password -p $(_jq '.key') -f ${tmpfile} | ||
rm ${tmpfile} | ||
done | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ RUN apt-get -y update && \ | |
netcat-traditional \ | ||
unzip \ | ||
zip \ | ||
vim \ | ||
jq \ | ||
sysstat | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
put json files on this folder with the following json format | ||
``` | ||
[ | ||
{"key":"keys/node/windows.password","value": "123456."}, | ||
{"key":"keys/node/windows2.password","value" : "123456."} | ||
] | ||
``` |