From 00bcb191d56b8dbc40c12058236eb12827b1b320 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Mon, 24 Jun 2024 01:28:01 +0300 Subject: lib/_ak_ipfs: _ak_ipfs_swarm_connect introduced --- lib/_ak_ipfs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/_ak_ipfs b/lib/_ak_ipfs index 35c38a5..c2ad1b6 100755 --- a/lib/_ak_ipfs +++ b/lib/_ak_ipfs @@ -11,6 +11,15 @@ _ak_ipfs_daemon(){ printf '%s' "$!" > $AK_WORKDIR/akipfsd.pid } +_ak_ipfs_swarm_connect(){ + if [ ! -z $1 ] && [ -n "$1" ] + then + _ak_ipfs swarm connect "$1" + else + ak_log_error "No peer address provided" + fi +} + _ak_ipfs_get_peers(){ _ak_ipfs swarm peers 1> /dev/null 2>&1 if [ $? == 0 ] -- cgit v1.2.3