mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
regenconf/apt:Purge expired apt keys
Co-authored-by: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com>
This commit is contained in:
parent
707180da43
commit
fa64652681
1 changed files with 3 additions and 6 deletions
|
@ -69,12 +69,9 @@ do_post_regen() {
|
||||||
wget --timeout 900 --quiet "https://packages.sury.org/php/apt.gpg" --output-document=- | gpg --dearmor >"/etc/apt/trusted.gpg.d/extra_php_version.gpg"
|
wget --timeout 900 --quiet "https://packages.sury.org/php/apt.gpg" --output-document=- | gpg --dearmor >"/etc/apt/trusted.gpg.d/extra_php_version.gpg"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Update sury apt key if 95BD4743 is present
|
# Purge expired keys (such as sury 95BD4743)
|
||||||
if apt-key list | grep -q "95BD4743"; then
|
EXPIRED_KEYS="$(LC_ALL='en_US.UTF-8' apt-key list 2>/dev/null | grep -A1 'expired:' | grep -v 'expired\|^-' | sed 's/\s//g')"
|
||||||
echo "Updating sury apt key..."
|
for KEY in $EXPIRED_KEYS; do apt-key del $KEY 2>/dev/null; done
|
||||||
apt-key del 95BD4743; wget -nv -O - "https://packages.sury.org/php/apt.gpg" | apt-key add -
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Make sure php7.4 is the default version when using php in cli
|
# Make sure php7.4 is the default version when using php in cli
|
||||||
if test -e /usr/bin/php$YNH_DEFAULT_PHP_VERSION
|
if test -e /usr/bin/php$YNH_DEFAULT_PHP_VERSION
|
||||||
then
|
then
|
||||||
|
|
Loading…
Add table
Reference in a new issue