aboutsummaryrefslogtreecommitdiff
path: root/init.sh
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-07-23 14:10:03 +0300
committerkaotisk <kaotisk@arching-kaos.org>2024-07-23 14:10:03 +0300
commita359611ed2bcc79bf440f05096cfbdc618869067 (patch)
tree7d4d5fb32a3ee842320474917ca95b09d8190400 /init.sh
parent3dbf01ec2d879beab38c84f20cc8986b15d3cd18 (diff)
downloadarching-kaos-tools-a359611ed2bcc79bf440f05096cfbdc618869067.tar.gz
arching-kaos-tools-a359611ed2bcc79bf440f05096cfbdc618869067.tar.bz2
arching-kaos-tools-a359611ed2bcc79bf440f05096cfbdc618869067.zip
use settings instead of file to store activated gpg key
Diffstat (limited to 'init.sh')
-rwxr-xr-xinit.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/init.sh b/init.sh
index b96d674..51a32a0 100755
--- a/init.sh
+++ b/init.sh
@@ -1,6 +1,7 @@
#!/bin/bash
set -x
source lib/_ak_ipfs
+source lib/_ak_settings
# TODO GPG/PGP setup:: possibly done
# eg gpg2 --full-key-generate and/or gpg2 --set-default key
@@ -12,7 +13,7 @@ ak_gpg_check_or_create(){
then
gpg2 --homedir $AK_GPGHOME --batch --passphrase '' --quick-gen-key kaos@kaos.kaos rsa3072 sign 0
AK_FINGERPRINT="$(gpg2 --homedir $AK_GPGHOME --list-keys | grep kaos@kaos.kaos -B 1 | head -n 1 | awk '{print $1}')"
- printf '%s' "$AK_FINGERPRINT" > $AK_WORKDIR/current_key
+ _ak_settings_set "gpg.fingerprint" "$AK_FINGERPRINT"
gpg2 --homedir $AK_GPGHOME --batch --passphrase '' --quick-add-key $AK_FINGERPRINT rsa3072 encrypt 0
fi
}