diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-06-24 01:28:01 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-06-24 01:28:01 +0300 |
commit | 00bcb191d56b8dbc40c12058236eb12827b1b320 (patch) | |
tree | fdf6d56b910b91789d27cedb2e08e1e658b4e810 | |
parent | f493668bd5af77ddd7ffa1a877146d729865bd9d (diff) | |
download | arching-kaos-tools-00bcb191d56b8dbc40c12058236eb12827b1b320.tar.gz arching-kaos-tools-00bcb191d56b8dbc40c12058236eb12827b1b320.tar.bz2 arching-kaos-tools-00bcb191d56b8dbc40c12058236eb12827b1b320.zip |
lib/_ak_ipfs: _ak_ipfs_swarm_connect introduced
-rwxr-xr-x | lib/_ak_ipfs | 9 |
1 files changed, 9 insertions, 0 deletions
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 ] |