aboutsummaryrefslogtreecommitdiff
path: root/bin/ak-zblock-announce
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-03-27 09:34:01 +0200
committerkaotisk <kaotisk@arching-kaos.org>2024-03-27 09:34:01 +0200
commit465d5db06e56dc21072a8ff01258f6815d340b00 (patch)
treeae16ecf2f980b054caa2f97f48e8fa5f22b768a6 /bin/ak-zblock-announce
parent1cb6c8bef840a96baa37392e9833a7674f805a83 (diff)
downloadarching-kaos-tools-465d5db06e56dc21072a8ff01258f6815d340b00.tar.gz
arching-kaos-tools-465d5db06e56dc21072a8ff01258f6815d340b00.tar.bz2
arching-kaos-tools-465d5db06e56dc21072a8ff01258f6815d340b00.zip
new lib _ak_ipfs
Diffstat (limited to 'bin/ak-zblock-announce')
-rwxr-xr-xbin/ak-zblock-announce14
1 files changed, 14 insertions, 0 deletions
diff --git a/bin/ak-zblock-announce b/bin/ak-zblock-announce
new file mode 100755
index 0000000..74bcdfc
--- /dev/null
+++ b/bin/ak-zblock-announce
@@ -0,0 +1,14 @@
+#!/bin/bash
+PROGRAM="$(basename $0)"
+descriptionString="Announce zblock to local API for schain processing"
+source $AK_LIBDIR/_ak_logit
+source $AK_LIBDIR/_ak_script_description
+
+curl http://127.0.0.1:8610/v0/announce/zblock --header 'Content-Type: application/json' --data-raw '{"zblock":"'$(ak-get-zlatest)'"}' 2>/dev/null | jq -M -c > /dev/null
+if [ "$?" == "0" ]
+then
+ logit "INFO" "zblock $zblock announced"
+else
+ logit "ERROR" "zblock $zblock announcement failed"
+fi
+