aboutsummaryrefslogtreecommitdiff
path: root/bin/ak-config
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-06-10 17:03:58 +0300
committerkaotisk <kaotisk@arching-kaos.org>2024-06-10 17:03:58 +0300
commit3867120e959a34d3b27422864171d385de76b478 (patch)
tree0d7043c7d9abef75a0d05482f752900caa58fa83 /bin/ak-config
parent7c5ce2313038333ab8eed02e35006de5783c21e0 (diff)
downloadarching-kaos-tools-3867120e959a34d3b27422864171d385de76b478.tar.gz
arching-kaos-tools-3867120e959a34d3b27422864171d385de76b478.tar.bz2
arching-kaos-tools-3867120e959a34d3b27422864171d385de76b478.zip
new flag for ak-config: --get-ipns-key
Diffstat (limited to 'bin/ak-config')
-rwxr-xr-xbin/ak-config7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/ak-config b/bin/ak-config
index bda8564..24db38f 100755
--- a/bin/ak-config
+++ b/bin/ak-config
@@ -10,6 +10,8 @@
##
## --get-published Get published ak-config (from IPFS)
##
+## --get-ipns-key Get the ak-config IPNS key
+##
fullprogrampath="$(realpath $0)"
PROGRAM="$(basename $0)"
descriptionString="Arching Kaos Configuration Tool"
@@ -19,6 +21,10 @@ source $AK_LIBDIR/_ak_gpg
source $AK_LIBDIR/_ak_ipfs
source $AK_LIBDIR/_ak_node
+_ak_config_get_ipns_key(){
+ _ak_ipfs_key_list_full | grep 'ak-config' | cut -d ' ' -f 1
+}
+
_ak_config_show(){
# We will be using our public key also to put it in the block later
KEY="tmp-gpg.pub"
@@ -65,6 +71,7 @@ then
--show) _ak_config_show;exit;;
--publish) _ak_config_publish;exit;;
--get-published) _ak_config_published;exit;;
+ --get-ipns-key) _ak_config_get_ipns_key;exit;;
*) _ak_usage;exit;;
esac
else