1
0
Fork 0
This commit is contained in:
qo-op 2020-03-26 03:20:04 +01:00
parent 415d4aa814
commit ae5a241be7
2 changed files with 9 additions and 8 deletions

View File

@ -33,8 +33,6 @@ echo '
########################################################################
# ENVIRONEMENT DETECTION + IPFS ~/.zen/ipfs/.$ipfsnodeid/G1SSB/_info
########################################################################
ipfs_process_owner=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1)
[[ "$ipfs_process_owner" == "" ]] && echo "ERROR ipfs daemon is not running !!" && exit 1
ipfsnodeid=$(ipfs id -f='<id>\n')
[[ $ipfsnodeid == "" ]] && echo "ERROR missing IPFS Node id !! IPFS is not installed !?" && exit 1
########################################################################
@ -89,10 +87,8 @@ echo "
___ _ _ __
| |_)|_(_ _. _| _|
_|_| | __) (_|(_|(_| ... and ... Node IPNS publish
~/.zen/ipfs
ipfs ls /ipns/$NODEIPNS
_|_| | __) (_|(_|(_|
~/.zen/ipfs
"
# COPY NODE G1SSB ID to IPFS
@ -103,6 +99,7 @@ IWALLETS=$(ipfs add -rHq ~/.zen/ipfs | tail -n 1)
NODEIPNS=$(ipfs name publish --allow-offline --quieter /ipfs/$IWALLETS)
echo "
ipfs ls /ipns/$NODEIPNS
_ _ _ _ _
(_)_ ____ _(_) |_ __ _| |_(_) ___ _ __
| | _ \ \ / / | __/ _| | __| |/ _ \| _ \

View File

@ -21,7 +21,7 @@ echo '
| | | | \ V /| | || (_| | |_| | (_) | | | |
|_|_| |_|\_/ |_|\__\__|_|\__|_|\___/|_| |_| contact SURVEY
# An New Station wants to Join our ASTROPORT !!
# New Station is joining ASTROPORT !!
DETECT in SSB feed messages "type": "contact", "autofollow": true
@ -53,7 +53,7 @@ self=$(sbotc whoami | jq -r .id) || exit 1
g1self=$(echo $self | cut -d '@' -f 2 | cut -d '.' -f 1 | base64 -d | base58)
self_name=$(sbotc query.read '{"query":[{"$filter":{"value":{"author": "'"$self"'", "content":{"type":"about", "about": "'"$self"'"}}}}]}' | jq -r .value?.content?.name | grep -v null | tail -n 1)
messages=$(sbotc messagesByType '{"type":"contact","old":false}')
messages=$(sbotc messagesByType '{"type":"contact"')
while read -r msg
do
@ -127,6 +127,10 @@ FROM.IPFS_${ipfsnodeid}
"
sbotc publish '{"type":"post","text":"#astroport-swarmkey = ['"$name"']('"$id"') TO.SSB_${author} TO.G1_${g1author} +++ FROM.SSB_${self_name} FROM.G1_${g1self} FROM.IPFS_${ipfsnodeid}","mentions":[{"link":"'"$id"'","name":"'"$name"'","size":'"$size"',"type":"'"$type"'"}]}'
else
echo "NO swarm.key here."
fi
done < <(printf '%s\n' "$messages")