X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=debian%2Fneurodebian-popularity-contest.postrm;fp=debian%2Fneurodebian-popularity-contest.postrm;h=92bb35d88fc615bd3278a147dd77320a0d7ed88b;hb=6c6fa9cd3bd627a60f165682f96af3cc06d9ccc9;hp=6615555b99f81749e61ae8bc544a63d76919a093;hpb=15d0a7f8a363c9fe2b286ddcb99acc41c9c91681;p=neurodebian.git diff --git a/debian/neurodebian-popularity-contest.postrm b/debian/neurodebian-popularity-contest.postrm index 6615555..92bb35d 100755 --- a/debian/neurodebian-popularity-contest.postrm +++ b/debian/neurodebian-popularity-contest.postrm @@ -2,11 +2,12 @@ #DEBHELPER# -# If requested to be purged -- remove our entry popcon_conf=/etc/popularity-contest.conf -if [ "$1" = "purge" ]; then +nd_popcon_conf=/etc/popularity-contest.d/neurodebian.conf +remove_neurodebian_popcon_pre161() { # Adjust popularity-contest.conf - if [ -e "$popcon_conf" ]; then + if [ -e "$popcon_conf" ] \ + && grep -q "http://neuro.debian.net/cgi-bin/popcon-submit.cgi" $popcon_conf; then echo "Removing NeuroDebian url for Popularity Contest submissions." # First remove any explicit mentioning and then empty additions sed -i -e 's,http://neuro.debian.net/cgi-bin/popcon-submit.cgi,,g' \ @@ -14,4 +15,9 @@ if [ "$1" = "purge" ]; then -e '/SUBMITURLS="$SUBMITURLS *"/d' \ "$popcon_conf" fi +} + +# If requested to be purged -- remove our entry +if [ "$1" = "purge" ]; then + remove_neurodebian_popcon_pre161 fi