File: libapache2-mod-nss.postinst

package info (click to toggle)
libapache2-mod-nss 1.0.14-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,016 kB
  • ctags: 1,163
  • sloc: ansic: 7,710; python: 882; sh: 440; perl: 238; lex: 190; makefile: 123; yacc: 95
file content (24 lines) | stat: -rw-r--r-- 653 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
set -e

CERTDIR=/etc/apache2/nssdb

if [ "$1" = configure ]; then
    if dpkg --compare-versions "$2" lt-nl "1.0.12-2"; then
        # buggy gencert created this
	if [ -f /0 ]; then
            rm -f /0
        fi
    fi
    if [ ! -e $CERTDIR/key3.db ]; then
        /usr/share/libapache2-mod-nss/gencert \
		$CERTDIR > $CERTDIR/install.log 2>&1
        echo "libapache2-mod-nss certificate database generated."
    fi

    # Make sure that the database ownership is setup properly.
    find $CERTDIR -user root -name "*.db" -exec /bin/chgrp www-data {} \;
    find $CERTDIR -user root -name "*.db" -exec /bin/chmod g+r {} \;
fi

#DEBHELPER#