File: sendmail-bin.prerm.in

package info (click to toggle)
sendmail 8.18.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,268 kB
  • sloc: ansic: 106,906; perl: 7,504; sh: 5,488; makefile: 888
file content (26 lines) | stat: -rw-r--r-- 675 bytes parent folder | download | duplicates (7)
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
#!/bin/sh
set -e

if [ "$1" = "remove" ]; then
	# Prevent cronjob from running during removal...
	if [ -f @sysconfdir@/cron.d/sendmail ]; then
		rm -f @sysconfdir@/cron.d/sendmail
	fi
fi

if [ "$1" = "upgrade" ]; then
	# Prevent cronjob from running during upgrade...
	if [ -f @sysconfdir@/cron.d/sendmail ]; then
		echo "#prerm" > @sysconfdir@/cron.d/sendmail
		# The cronjob is regenerated by the postinst
	fi
fi

#DEBHELPER#

if [ "$1" = "remove" ]; then
	# Remove alternatives for MTA, MSP
	# Note: removes paths needed by the initscript
	update-alternatives --remove sendmail-mta @libexecdir@/sendmail
	update-alternatives --remove sendmail-msp @libexecdir@/sendmail
fi