summaryrefslogtreecommitdiff
path: root/debian/lighttpd.postinst
blob: c23d62e614ec910b25e097647b696975dfdbb436 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /bin/sh -e
# postinst script for lighttpd

if [ "$1" = "configure" ]; then
   	if [ ! -r /var/www/index.lighttpd.html ];
   	then
   		cp /usr/share/lighttpd/index.html /var/www/index.lighttpd.html
	fi
        mkdir -p /var/run/lighttpd > /dev/null 2> /dev/null
	chown www-data:www-data /var/log/lighttpd /var/run/lighttpd
        chown www-data:www-data /var/cache/lighttpd /var/cache/lighttpd/compress /var/cache/lighttpd/uploads
	chmod 0750 /var/log/lighttpd /var/run/lighttpd
fi

update-alternatives --quiet --install \
    /usr/bin/spawn-fcgi spawn-fcgi /usr/bin/spawn-fcgi.lighttpd 20
update-alternatives --quiet --install \
    /usr/share/man/man1/spawn-fcgi.1.gz spawn-fcgi.1.gz /usr/share/man/man1/spawn-fcgi.lighttpd.1.gz 20

#DEBHELPER#

exit 0