Skip to content

Commit

Permalink
improve GnuPG setup on Ubuntu 24.04
Browse files Browse the repository at this point in the history
  • Loading branch information
georglauterbach committed Jul 21, 2024
1 parent 983ad6f commit 90bc71c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions data/versioned/24.04/post_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@ function setup_gnupg() {
local GNUPG_HOME_DIR="${HOME}/.gnupg"
mkdir -p "${GNUPG_HOME_DIR}"
touch "${GNUPG_HOME_DIR}/gpg-agent.conf"

if ! grep -q 'pinentry-program' "${GNUPG_HOME_DIR}/gpg-agent.conf"; then
echo 'pinentry-program /usr/bin/pinentry-curses' >>"${GNUPG_HOME_DIR}/gpg-agent.conf"
gpg-connect-agent reloadagent /bye &>/dev/null || :
fi

chown -R "${USER}:${USER}" "${GNUPG_HOME_DIR}"
find "${GNUPG_HOME_DIR}" -type f -exec chmod 600 {} \;
find "${GNUPG_HOME_DIR}" -type d -exec chmod 700 {} \;
}

function setup_snap() {
Expand Down

0 comments on commit 90bc71c

Please sign in to comment.