]> git.nbdom.net Git - nb.git/commitdiff
etc/profile.d/gpg.sh
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 2 May 2025 06:42:24 +0000 (08:42 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 2 May 2025 06:42:24 +0000 (08:42 +0200)
etc/profile.d/gpg.sh

index e20ba0e5e7dd3c0925d9922c46a86fa3e53b358f..497baa620a0bc2184ee83c6584e9ef9e86dec9be 100644 (file)
@@ -14,6 +14,8 @@ gpg_change_password() {
        key=${1}
        [ -z "$key" -a -r ~/.gnupg/gpg.conf ] && key="$(awk '$1 == "default-key" {print $2;exit}' ~/.gnupg/gpg.conf)"
        [ -z "$key" ] && echo "Key missing !" && return 1
+       gpg --change-passphrase "$key"
+       return
        echo "Changing password for $key"
        read -s -p "Enter old password:" old 
        echo