This commit is contained in:
Marc Beninca 2024-11-18 12:03:15 +01:00
parent 4d8be7e299
commit 9a83206f3c
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -1,19 +1,19 @@
# turn gpg agent off # turn gpg agent off
gak() { gpg_agent_kill "${@}"; } gak() { gpg_agent_kill "${@}"; }
gpg_agent_kill() { sh_gpg_agent_kill() {
gpgconf \ gpgconf \
--kill "gpg-agent" --kill "gpg-agent"
} }
# bind gpg agent to current tty # bind gpg agent to current tty
gau() { gpg_agent_update "${@}"; } gau() { gpg_agent_update "${@}"; }
gpg_agent_update() { sh_gpg_agent_update() {
gpg-connect-agent \ gpg-connect-agent \
updatestartuptty \ updatestartuptty \
/bye /bye
} }
gpg_ssh() { sh_gpg_ssh() {
local user_id local user_id
user_id=$(id --user) user_id=$(id --user)
if [ "${user_id}" -ne 0 ]; then if [ "${user_id}" -ne 0 ]; then
@ -24,4 +24,4 @@ gpg_ssh() {
fi fi
} }
gpg_ssh sh_gpg_ssh