File: //var/lib/dpkg/info/cpanel-userperl.postrm
#!/bin/sh
# doc: https://wiki.debian.org/MaintainerScripts
set -e
# the expected SITE_LIB
export SITE_LIB='/usr/local/share/perl/5.30.0'
removeUserConfig() {
# only if /usr/bin/perl is available
[ -x /usr/bin/perl ] || return;
# only remove the file during uninstall if different than the one we ship
/usr/bin/perl -MConfig -e 'exit if $Config{sitelib} eq $ENV{SITE_LIB};\
unlink "$Config{sitelib}/cPanelUserConfig.pm"' ||:
}
case "$1" in
purge|remove)
removeUserConfig;
;;
esac
exit 0