cisti stari init.d
[amavisd-cn.git] / debian / preinst
index 2e1f55a..d0cc6e3 100755 (executable)
@@ -14,8 +14,13 @@ set -e
 # the debian-policy package
 
 if [ "$1" = install -o "$1" = upgrade ]; then
-  if [ -L /etc/init.d/amavis -a -f /etc/init.d/amavis.amavisd-new ]; then
+  if [ -f /etc/init.d/amavisd-cn ]; then
+    rm -f /etc/init.d/amavisd-cn
+  fi
+  if [ -L /etc/init.d/amavis ]; then
     rm -f /etc/init.d/amavis
+  fi
+  if [ -f /etc/init.d/amavis.amavisd-new ]; then
     dpkg-divert --quiet --package amavisd-cn --remove --rename \
       --divert /etc/init.d/amavis.amavisd-new /etc/init.d/amavis || true
     update-rc.d amavis defaults 19 21 >/dev/null || true