File: postinst

package info (click to toggle)
qpopper 2.53-7
  • links: PTS
  • area: main
  • in suites: potato
  • size: 656 kB
  • ctags: 372
  • sloc: ansic: 5,020; makefile: 132; sh: 54
file content (43 lines) | stat: -rw-r--r-- 899 bytes parent folder | download
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
37
38
39
40
41
42
43
#! /bin/sh
#
# Remove the original pop3 entry from /etc/inetd.conf, and add ours.
#

case "$1" in
	configure)
		;;
	abort-upgrade|abort-remove|abort-deconfigure)
		exit 0
		;;
	*)
		exit 0
		;;
esac
umask 022

PATH=/bin:/usr/bin:/sbin:/usr/sbin

# Compatibility symlinks into /usr/doc
if [ -d /usr/doc -a ! -e /usr/doc/qpopper \
        -a -d /usr/share/doc/qpopper ]
then
        ln -sf ../share/doc/qpopper /usr/doc/qpopper
fi

# Make sure /var/spool/pop is there, and mode drwxrwsr-x  root  mail
if [ ! -d /var/spool/pop ]
then
	mkdir -p /var/spool/pop
fi
chgrp mail /var/spool/pop
chmod 2775 /var/spool/pop

# Check if we have already been installed.
grep "^pop-3.*/in.qpopper" /etc/inetd.conf > /dev/null 2>&1 && exit 0

# Install the qpopper.
update-inetd --remove '^pop-3'
update-inetd --group MAIL --add \
  'pop-3\t\tstream\ttcp\tnowait\troot\t/usr/sbin/tcpd\t/usr/sbin/in.qpopper'

exit 0