File: mini-httpd.postinst

package info (click to toggle)
mini-httpd 1.23-1.2
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 804 kB
  • ctags: 1,050
  • sloc: ansic: 3,537; sh: 214; makefile: 102
file content (15 lines) | stat: -rw-r--r-- 438 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
set -e

if [ "$1" = "configure" ] && dpkg --compare-versions "1.19-9.3" gt "$2"
then
    dpkg-divert --package mini-httpd --rename --remove /usr/share/man/man1/htpasswd.1.gz
    dpkg-divert --package mini-httpd --rename --remove /usr/bin/htpasswd
fi

if [ ! -r /var/www/html/index.mini-httpd.html ]; then
    mkdir -p /var/www/html
    cp /usr/share/mini-httpd/html/index.html /var/www/html/index.mini-httpd.html
fi

#DEBHELPER#