blob: 0e54e51616bfefa4e0e4111b92d07dcbee714676 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#!/bin/sh
set -e;
PACKAGE=sendmail-bin;
if [ "$1" = "remove" ]; then
# Remove alternatives for MTA, MSP
update-alternatives --remove sendmail-mta @libexecdir@/sendmail;
update-alternatives --remove sendmail-msp @libexecdir@/sendmail;
if [ -x @sysconfdir@/init.d/sendmail ] && \
[ -x @datadir@/sendmail/sendmail ]; then
if [ -x /usr/sbin/invoke-rc.d ]; then
invoke-rc.d --quiet --force sendmail stop;
else
@sysconfdir@/init.d/sendmail stop;
fi;
fi;
# Prevent cronjob from running during upgrade...
if [ -f /etc/cron.d/sendmail ]; then
rm -f @sysconfdir@/cron.d/sendmail;
fi;
fi
if [ "$1" = "upgrade" ]; then
# Prevent cronjob from running during upgrade...
if [ -f /etc/cron.d/sendmail ]; then
echo "#prerm" > @sysconfdir@/cron.d/sendmail;
fi;
# NOTE NOTE NOTE NOTE NOTE
# If we fall through to DEBHELPER, sendmail will be stopped
# much earlier than necessary !!!
exit 0;
fi
#DEBHELPER#
|