You are here: Foswiki>Tasks Web>Item1087 (20 Mar 2009, SvenDowideit)Edit Attach

Item1087: debian installation script enhancement

pencil
Priority: Normal
Current State: Closed
Released In:
Target Release:
Applies To: Installer
Component:
Branches:
Reported By: BramVanOosterhout
Waiting For:
Last Change By: SvenDowideit
I had some issues installing foswiki on Ubuntu 8.04 with apache2. You can read the long story in Support.Question56.

This item aims to address the failure to deal with the apache config file installation

I used apt-get install foswiki and got
...
Setting up foswiki (1.0.0-1) ...
/var/lib/dpkg/info/foswiki.postinst: 211: apache-modconf: not found
dpkg: error processing foswiki (--configure):
 subprocess post-installation script returned error exit status 127
Errors were encountered while processing:
 foswiki
E: Sub-process /usr/bin/dpkg returned an error code (1)
make: *** [foswiki] Error 100
root@tinkerbell:/home/configure#      

Had a further look at the code in the installer and found (line numbers are mine. Don't have much options on a remote login):
1        servers="apache apache-perl apache-ssl apache2"
2        for server in $servers; do
3                if [ -e /etc/$server/conf.d ]; then                               <===============
4                        includefile=/etc/foswiki/apache.conf
5                        if [ -e /etc/$server/conf.d/foswiki.conf ]; then
6                                rm -f /etc/foswiki/$server-conf.d-foswiki.conf_o
ld
7                                mv /etc/$server/conf.d/foswiki.conf /etc/foswiki
/$server-conf.d-foswiki.conf_old
8                        fi
9                        ln -s $includefile /etc/$server/conf.d/foswiki.conf
10                       if [ $server = "apache2" ]; then
11                               a2enmod  authn_file
12                               a2enmod  rewrite
13                       else
14                               apache-modconf $server enable authn_file           <=============
15                               apache-modconf $server enable rewrite
16                        fi
17                fi
18        done

Line two loops over a collection of servers and checks whether they exist by checking for the existence of /etc/$server/conf.d

And I have both an apache/conf.d and an apache2/conf.d

maybe you can check what is running, or use which apache and which apache2 to find out what is actually installed. On my installation which apache returns ''

regards... -- BramVanOosterhout - 15 Feb 2009

frustrating stuff really - there is no 'correct' way to detect what web server is to be used - but your which suggestion sounds a good one - thanks smile

-- SvenDowideit - 16 Feb 2009

added which to postinst for 1.0.4

-- SvenDowideit - 20 Mar 2009

ItemTemplate edit

Summary debian installation script enhancement
ReportedBy BramVanOosterhout
Codebase 1.0.0
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Installer
Component
Priority Normal
CurrentState Closed
WaitingFor
Checkins distro:ca571ae2878d distro:26c5fb73b657
ReleasedIn
Topic revision: r4 - 20 Mar 2009, SvenDowideit
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy