| 1 |
#!/bin/sh |
| 2 |
# $Id: postinst,v 1.7 2003/06/21 02:31:44 herbert Exp $ |
| 3 |
|
| 4 |
set -e |
| 5 |
|
| 6 |
if grep -q '[[:blank:]]/usr/sbin/in\.ftpd.*-z' /etc/inetd.conf 2>/dev/null; then |
| 7 |
update-inetd --pattern '/usr/sbin/in\.ftpd' --remove ".*ftp" |
| 8 |
fi |
| 9 |
|
| 10 |
if grep -q '[[:blank:]]/usr/sbin/in\.ftpd\>' /etc/inetd.conf 2>/dev/null; then |
| 11 |
if ! grep -q '^ftp\>' /etc/inetd.conf; then |
| 12 |
update-inetd --pattern '/usr/sbin/in\.ftpd' --multi --enable ftp |
| 13 |
fi |
| 14 |
else |
| 15 |
FTPENTRY="ftp stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.ftpd" |
| 16 |
if grep -q '^ftp\>' /etc/inetd.conf 2>/dev/null; then |
| 17 |
update-inetd --group STANDARD --add "## $FTPENTRY" |
| 18 |
else |
| 19 |
update-inetd --group STANDARD --add "$FTPENTRY" |
| 20 |
fi |
| 21 |
fi |
| 22 |
|
| 23 |
if [ ! -f /etc/inetd.conf -a -d /etc/xinetd.d -a -x /usr/sbin/xinetd ]; then |
| 24 |
cat <<-TEXT |
| 25 |
------------------------------------------------ |
| 26 |
There is an example configuration for using ftpd |
| 27 |
under the control of xinetd. It is delivered as |
| 28 |
|
| 29 |
/usr/share/doc/ftpd-ssl/examples/ftpd.xinetd |
| 30 |
------------------------------------------------ |
| 31 |
TEXT |
| 32 |
fi |
| 33 |
|
| 34 |
if test ! -s /etc/ftpd-ssl/ftpd.pem; then |
| 35 |
cat <<-TEXT |
| 36 |
------------------------------------------------ |
| 37 |
This server will not start with default setting |
| 38 |
unless an SSL certificate is generated and put |
| 39 |
at the location |
| 40 |
|
| 41 |
/etc/ftpd-ssl/ftpd.pem |
| 42 |
|
| 43 |
The package ships a templated SSL configuration |
| 44 |
|
| 45 |
/etc/fptd-ssl/openssl.cnf |
| 46 |
------------------------------------------------ |
| 47 |
TEXT |
| 48 |
fi |
| 49 |
|
| 50 |
#DEBHELPER# |