1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
#!/bin/sh
set -e
# From apache2:
# check if we're installing or updating to
# prevent recopying default index.html on update.
is_fresh_install()
{
if [ -z "$2" ] ; then
return 0
fi
return 1
}
if is_fresh_install $@ ; then
mkdir -p /var/www/html
do_copy="true"
for file in index.html index.htm index.xhtml index.xht Default.htm index.cgi index.php index.mini-httpd.html ; do
if [ -e "/var/www/html/$file" ] ; then
do_copy="false"
break
fi
done
if [ "$do_copy" = "true" ]; then
if [ -r /usr/share/doc/mini-httpd/examples/index.html ]; then
cp /usr/share/doc/mini-httpd/examples/index.html /var/www/html/index.html
fi
fi
fi
#DEBHELPER#
|