Added check for already existent gpg keys. Fixes #12
This commit is contained in:
parent
c47f595e9e
commit
a618645950
|
|
@ -29,8 +29,11 @@ EOF" -ls /bin/bash nginx
|
||||||
}
|
}
|
||||||
|
|
||||||
gpg_import_key() {
|
gpg_import_key() {
|
||||||
su -m -c "$gpg --batch --import $gpg_private_key" -ls /bin/bash nginx
|
|
||||||
|
local key_id=$(su -m -c "gpg --with-colons $gpg_private_key | grep sec |cut -f5 -d:" -ls /bin/bash nginx)
|
||||||
|
|
||||||
su -m -c "$gpg --batch --import $gpg_public_key" -ls /bin/bash nginx
|
su -m -c "$gpg --batch --import $gpg_public_key" -ls /bin/bash nginx
|
||||||
|
su -m -c "gpg -K $key_id" -ls /bin/bash nginx || su -m -c "$gpg --batch --import $gpg_private_key" -ls /bin/bash nginx
|
||||||
}
|
}
|
||||||
|
|
||||||
core_setup() {
|
core_setup() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue