From 082177d774668ee925e43da0d741d8642d87f9ea Mon Sep 17 00:00:00 2001 From: kaotisk Date: Wed, 2 Nov 2022 02:51:19 +0200 Subject: Adapting to 96ae225b2a179ec36fdb01eaf906fec096002a08 change --- bin/ipfs-check | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'bin') diff --git a/bin/ipfs-check b/bin/ipfs-check index b891ea1..0e53599 100755 --- a/bin/ipfs-check +++ b/bin/ipfs-check @@ -1,48 +1,49 @@ #!/bin/bash +PROGRAM="$(basename $0)" logit(){ - logthis "ipfs-check: $1" + logthis "<$PROGRAM>" "$1" "$2" } ipfs files ls /zarchive > /dev/null if [ $? != 0 ] then - logit "/zarchive is missing" + logit "[ERROR]" "/zarchive is missing" else - logit "/zarchive OK" + logit "[INFO]" "/zarchive OK" fi ipfs files ls /zlatest > /dev/null if [ $? != 0 ] then - logit "/zlatest is missing" + logit "[ERROR]" "/zlatest is missing" else - logit "/zlatest is OK" + logit "[INFO]" "/zlatest is OK" fi ipfs key list | grep zchain > /dev/null if [ $? != 0 ]; then - logit "zchain key is missing" + logit "[WARNING]" "zchain key is missing" ipfs key gen zchain > $ZCHAIN if [ $? != 0 ]; then - logit "zchain fails to create" + logit "[ERROR]" "zchain fails to create" else - logit "zchain created" + logit "[INFO]" "zchain created" fi else - logit "zchain is there" + logit "[INFO]" "zchain is there" fi ipfs key list | grep ak-config > /dev/null if [ $? != 0 ]; then - logit "ak-config key is missing" + logit "[WARNING]" "ak-config key is missing" ipfs key gen ak-config if [ $? != 0 ]; then - logit "ak-config fails to create" + logit "[ERROR]" "ak-config fails to create" else - logit "ak-config created" + logit "[INFO]" "ak-config created" fi else - logit "ak-config is there" + logit "[INFO]" "ak-config is there" fi -- cgit v1.2.3