[pkg-lighttpd] Bug#383425: lighttpd: little script to check for listening socket

Bastian Kleineidam calvin at debian.org
Wed Jan 23 22:16:21 UTC 2008

Package: lighttpd
Version: 1.4.18-1
Followup-For: Bug #383425

Hash: SHA1


here is a little perl script that checks if a port is already used
by trying to bind() to it. I propose in the postinst you do:

if fresh_install:
    if port 80 is taken (by using the supplied script):
        ask debconf question for alternative port number
        configure alternative port number
start lighttpd

The debconf question might look like:

Port number to start lighttpd under
The standard HTTP server port 80 seems to be occupied by another
program. In order to start lighttpd you have to choose an alternative
port number, eg. port 81.

This way users can install apache, and then lighttpd without conflicts.


- -- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.23treasure4 (PREEMPT)
Locale: LANG=de_DE at euro, LC_CTYPE=de_DE at euro (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash

Versions of packages lighttpd depends on:
ii  libattr1               1:2.4.39-1        Extended attribute shared library
ii  libbz2-1.0             1.0.4-2           high-quality block-sorting file co
ii  libc6                  2.7-6             GNU C Library: Shared libraries
ii  libgamin0 [libfam0]    0.1.9-2           Client library for the gamin file 
ii  libldap2               2.1.30.dfsg-13.5  OpenLDAP libraries
ii  libpcre3               7.4-1             Perl 5 Compatible Regular Expressi
ii  libssl0.9.8            0.9.8g-4          SSL shared libraries
pn  libterm-readline-perl- <none>            (no description available)
ii  lsb-base               3.1-24            Linux Standard Base 3.1 init scrip
ii  mime-support           3.40-1            MIME files 'mime.types' & 'mailcap
ii  zlib1g                 1: compression library - runtime

lighttpd recommends no packages.

Version: GnuPG v1.4.6 (GNU/Linux)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: psock.pl
Type: application/x-perl
Size: 159 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-lighttpd-maintainers/attachments/20080123/baa3393f/attachment.bin 

More information about the pkg-lighttpd-maintainers mailing list