From 32bf52722a1c7a4f5d831aca38f5e05510d8aca8 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Sat, 25 Jun 2022 18:26:13 +0300 Subject: Simple AK check for IPFS integrations --- bin/ipfs-check | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'bin/ipfs-check') diff --git a/bin/ipfs-check b/bin/ipfs-check index 509593a..b891ea1 100755 --- a/bin/ipfs-check +++ b/bin/ipfs-check @@ -4,13 +4,24 @@ logit(){ } -ipfs files ls /zarchive -if [ $? != 0 ]; then logit "/zarchive is missing" ; fi +ipfs files ls /zarchive > /dev/null +if [ $? != 0 ] +then + logit "/zarchive is missing" +else + logit "/zarchive OK" +fi + -ipfs files ls /zlatest -if [ $? != 0 ]; then logit "/zlatest is missing" ; fi +ipfs files ls /zlatest > /dev/null +if [ $? != 0 ] +then + logit "/zlatest is missing" +else + logit "/zlatest is OK" +fi -ipfs key list | grep zchain +ipfs key list | grep zchain > /dev/null if [ $? != 0 ]; then logit "zchain key is missing" ipfs key gen zchain > $ZCHAIN @@ -19,9 +30,11 @@ if [ $? != 0 ]; then else logit "zchain created" fi +else + logit "zchain is there" fi -ipfs key list | grep ak-config +ipfs key list | grep ak-config > /dev/null if [ $? != 0 ]; then logit "ak-config key is missing" ipfs key gen ak-config @@ -30,4 +43,6 @@ if [ $? != 0 ]; then else logit "ak-config created" fi +else + logit "ak-config is there" fi -- cgit v1.2.3