prepare upload
[packages/xinetd.git] / debian / xinetd.postrm
1 #!/bin/sh -e
2 # xinetd postrm
3
4 case "$1" in
5   remove)
6     if [ ! -f "/etc/init.d/inetd.real" ]; then
7       echo ""
8       echo "WARNING: you don't have an init script for the original"
9       echo "inetd anymore! You may need to reinstall the netkit-inetd"
10       echo "package to get it back."
11       echo ""
12     fi
13     rm -f /etc/init.d/inetd
14     dpkg-divert --package xinetd --remove --rename --divert \
15                   /etc/init.d/inetd.real /etc/init.d/inetd
16     if [ -f "/etc/init.d/inetd.real" ]; then
17         if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
18             invoke-rc.d inetd start
19         elif [ -x /etc/init.d/inetd ]; then
20             /etc/init.d/inetd start
21         fi
22     fi
23     ;;
24   purge)
25     rm -f /etc/xinetd.conf*
26     rm -f /etc/default/xinetd
27     rm -rf /etc/xinetd.d/
28     ;;
29 esac
30
31 #DEBHELPER#