Commit 8a867c8f authored by Helmut Grohne's avatar Helmut Grohne Committed by Helmut Grohne

Merge branch gps-guest/rm-index.lighttpd.html into master

parents 4f5462ea 81cd2d17
# override prior index-file.name directive
# to fall back to default index.lighttpd.html
index-file.names := ( "index.php", "index.html", "index.lighttpd.html" )
......@@ -31,7 +31,7 @@ server.http-parseopts = (
#"url-query-20-plus" => "enable",# consistency in query string
)
index-file.names = ( "index.php", "index.html", "index.lighttpd.html" )
index-file.names = ( "index.php", "index.html" )
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
......
......@@ -4,10 +4,6 @@
set -e
if [ "$1" = "configure" ]; then
if [ ! -r /var/www/html/index.lighttpd.html ]; then
cp /usr/share/lighttpd/index.html /var/www/html/index.lighttpd.html
fi
# Remove a possibly dangling symlink for the obsolete conffile
if dpkg --compare-versions "$2" lt-nl "1.4.32-1" && \
[ -L /etc/lighttpd/conf-enabled/10-access.conf -a \
......@@ -15,6 +11,20 @@ if [ "$1" = "configure" ]; then
rm -f /etc/lighttpd/conf-enabled/10-access.conf
fi
# Enable 99-unconfigured.conf if lighttpd has not been configured
# (if /var/www/html/index.html does not exist or is not readable)
# (if index-file.names is unmodified from default lighttpd.conf)
nconfs=$(ls /etc/lighttpd/conf-enabled/*.conf 2>/dev/null | wc -l)
if [ "$nconfs" = "0" -a ! -r "/var/www/html/index.html" ]; then
idx=$(grep index-file\\.names /etc/lighttpd/lighttpd.conf \
2>/dev/null | sed -E 's/[ \t]+/ /g')
if [ "$idx" = 'index-file.names = ( "index.php", "index.html" )' ] \
&& lighty-enable-mod unconfigured; then
if [ ! -r /var/www/html/index.lighttpd.html ]; then
cp /usr/share/lighttpd/index.html /var/www/html/index.lighttpd.html
fi
fi
fi
fi
# dh_installinit will call this function upon failure of rc.d invocation
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment