diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2023-03-29 23:46:45 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2023-03-29 23:46:45 +0300 |
commit | 7e45b9def509ff28f70c28f50f5aa931f512d81b (patch) | |
tree | cba30ff5eb679f1c6426dedb5383bd401f8f8cfb /bin/ak-zchain-chk | |
parent | 286b71a6ead8c7234cfbc0b8ece05c8239a4f32c (diff) | |
download | arching-kaos-tools-7e45b9def509ff28f70c28f50f5aa931f512d81b.tar.gz arching-kaos-tools-7e45b9def509ff28f70c28f50f5aa931f512d81b.tar.bz2 arching-kaos-tools-7e45b9def509ff28f70c28f50f5aa931f512d81b.zip |
Further renaming
Diffstat (limited to 'bin/ak-zchain-chk')
-rwxr-xr-x | bin/ak-zchain-chk | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/bin/ak-zchain-chk b/bin/ak-zchain-chk index c75dc4b..963754c 100755 --- a/bin/ak-zchain-chk +++ b/bin/ak-zchain-chk @@ -67,36 +67,36 @@ do # Reset timestamp since it's introduced later timestamp='' # Announce to stdout which ZBLOCK is being read at the moment - logthis "[INFO]" "Examining $zblock" + ak-logthis "[INFO]" "Examining $zblock" # We create files named after each ZBLOCK IPFS CID for later # reference. Files are empty. touch $ZBLOCKDIR/$zblock - logthis "[INFO]" "Created reference" + ak-logthis "[INFO]" "Created reference" # We concatenate the zblock's contents, pipe them through filter # json2bash and output them to tmp-file ipfs cat $zblock | json2bash > $TEMPASSIN/tmp-zblock - logthis "[INFO]" "ZBLOCK $zblock READ" + ak-logthis "[INFO]" "ZBLOCK $zblock READ" # Supposingly you are on a safe environment and you only have # access to your chain, I would consider mild secure to source # the files into your bash. # File an issue/pull request if you think it can be done better!! source $TEMPASSIN/tmp-zblock - logthis "[INFO]" "ZBLOCK SOURCED" + ak-logthis "[INFO]" "ZBLOCK SOURCED" # Same as above applies to BLOCK and DATA subparts of each ZBLOCK # BLOCKS ipfs cat $block | json2bash > $TEMPASSIN/tmp-block source $TEMPASSIN/tmp-block - logthis "[INFO]" "BLOCK $block SOURCED" + ak-logthis "[INFO]" "BLOCK $block SOURCED" touch $BLOCKDIR/$block - logthis "[INFO]" "BLOCK REFERENCED" + ak-logthis "[INFO]" "BLOCK REFERENCED" module="$(echo $action | sed -e 's/\// /g' | awk '{ print $1 }')" - logthis "[INFO]" "DATA is $module module." + ak-logthis "[INFO]" "DATA is $module module." command="$(echo $action | sed -e 's/\// /g' | awk '{ print $2 }')" - logthis "[INFO]" "COMMAND is $command" + ak-logthis "[INFO]" "COMMAND is $command" if [ ! -v $timestamp ] then echo "$timestamp : $zblock -> $block -> $previous" @@ -109,7 +109,7 @@ do # code 0 if [ -v $previous ] then - logthis "[ERROR]" "Block $block has no previous zblock" + ak-logthis "[ERROR]" "Block $block has no previous zblock" echo "Chain with no genesis" if [ "$fix" == "1" ] then @@ -132,12 +132,12 @@ do elif [ "$zblock" == "$seed" ] then echo "Chain is OK with GENESIS block = $seed" - logthis "[INFO]" "Counter $counter" + ak-logthis "[INFO]" "Counter $counter" exit 0 fi # And finally, if nothing is there exit with error else - logthis "[ERROR]" "Check not passed... No previous IPFS CID" + ak-logthis "[ERROR]" "Check not passed... No previous IPFS CID" exit 1 fi done |