20 lines
753 B
Plaintext
20 lines
753 B
Plaintext
if [ "$action" != "purge" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
# If the user is "purging" the package (removing the package and associated
|
|
# configuration), remove our custom repository and signing key.
|
|
|
|
# Determine the path to the apt-config command.
|
|
APT_CONFIG="$(command -v apt-config 2> /dev/null)"
|
|
|
|
# Use apt-config to determine the location of the trusted keys directory, then
|
|
# delete our key from it.
|
|
eval $("$APT_CONFIG" shell APT_TRUSTED_KEYRING_DIR 'Dir::Etc::trustedparts/d')
|
|
rm -f "${APT_TRUSTED_KEYRING_DIR}@@REPO_NAME@@.gpg"
|
|
|
|
# Use apt-config to determine the location of the source list config directory,
|
|
# then delete our entry.
|
|
eval $("$APT_CONFIG" shell APT_SOURCE_LIST_DIR 'Dir::Etc::sourceparts/d')
|
|
rm -f "${APT_SOURCE_LIST_DIR}@@REPO_NAME@@.list"
|