Merge pull request #1777 from YunoHost/Tagadda-patch-1

Update sury apt key
This commit is contained in:
Bram 2024-02-20 21:32:56 +01:00 committed by GitHub
commit ac02ca812d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -62,6 +62,10 @@ Pin-Priority: -1
do_post_regen() {
regen_conf_files=$1
# Purge expired keys (such as sury 95BD4743)
EXPIRED_KEYS="$(LC_ALL='en_US.UTF-8' apt-key list 2>/dev/null | grep -A1 'expired:' | grep -v 'expired\|^-' | sed 's/\s//g')"
for KEY in $EXPIRED_KEYS; do apt-key del $KEY 2>/dev/null; done
# Add sury key
# We do this only at the post regen and if the key doesn't already exists, because we don't want the regenconf to fuck everything up if the regenconf runs while the network is down
if [[ ! -s /etc/apt/trusted.gpg.d/extra_php_version.gpg ]]