From 62317f5a58ffb2161d4fe67aa83a64a4cf738eff Mon Sep 17 00:00:00 2001 From: kaotisk Date: Sat, 20 Jul 2024 18:18:46 +0300 Subject: ak cjdns --ip : returns your cjdns ip --- lib/_ak_cjdns | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib') diff --git a/lib/_ak_cjdns b/lib/_ak_cjdns index 0eda944..4328c65 100755 --- a/lib/_ak_cjdns +++ b/lib/_ak_cjdns @@ -168,3 +168,16 @@ _ak_cjdns_connect_peers(){ _ak_cjdns_read_peers_to_vars_natively fi } + +_ak_cjdns_get_ip(){ + which ip > /dev/null 2>&1 + if [ $? -ne 0 ] + then + _ak_log_error "You need ip tool installed" + exit 2 + fi + ip a | \ + grep 'inet6 *fc' | \ + awk '{print $2}' | \ + cut -d'/' -f1 +} -- cgit v1.2.3