File: postinst

package info (click to toggle)
linux-ftpd-ssl 0.17.36%2B0.3-2.2
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 2,524 kB
  • sloc: ansic: 3,875; yacc: 1,379; sh: 52; makefile: 48
file content (50 lines) | stat: -rw-r--r-- 1,432 bytes parent folder | download | duplicates (4)
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
44
45
46
47
48
49
50
#!/bin/sh
# $Id: postinst,v 1.7 2003/06/21 02:31:44 herbert Exp $

set -e

if grep -q '[[:blank:]]/usr/sbin/in\.ftpd.*-z' /etc/inetd.conf 2>/dev/null; then
	update-inetd --pattern '/usr/sbin/in\.ftpd' --remove ".*ftp"
fi

if grep -q '[[:blank:]]/usr/sbin/in\.ftpd\>' /etc/inetd.conf 2>/dev/null; then
	if ! grep -q '^ftp\>' /etc/inetd.conf; then
		update-inetd --pattern '/usr/sbin/in\.ftpd' --multi --enable ftp
	fi
else
	FTPENTRY="ftp		stream	tcp	nowait	root	/usr/sbin/tcpd	/usr/sbin/in.ftpd"
	if grep -q '^ftp\>' /etc/inetd.conf 2>/dev/null; then
		update-inetd --group STANDARD --add "## $FTPENTRY"
	else
		update-inetd --group STANDARD --add "$FTPENTRY"
	fi
fi

if [ ! -f /etc/inetd.conf -a -d /etc/xinetd.d -a -x /usr/sbin/xinetd ]; then
	cat <<-TEXT
		------------------------------------------------
		There is an example configuration for using ftpd
		under the control of xinetd. It is delivered as

		    /usr/share/doc/ftpd-ssl/examples/ftpd.xinetd
		------------------------------------------------
	TEXT
fi

if test ! -s /etc/ftpd-ssl/ftpd.pem; then
	cat <<-TEXT
		------------------------------------------------
		This server will not start with default setting
		unless an SSL certificate is generated and put
		at the location

		    /etc/ftpd-ssl/ftpd.pem

		The package ships a templated SSL configuration

		    /etc/fptd-ssl/openssl.cnf
		------------------------------------------------
	TEXT
fi

#DEBHELPER#