Add Debian directory
[mspang/vmailman.git] / debian / preinst
1 #!/bin/sh -e
2 # $URL: svn+ssh://lmamane@svn.debian.org/svn/pkg-mailman/trunk/debian/preinst $
3 # $Id: preinst 333 2006-08-15 13:48:53Z thijs $
4
5 . /usr/share/debconf/confmodule
6
7 if [ "$1" = "install" ]; then
8         if ! id -g list > /dev/null 2>&1 ; then
9                 addgroup --system list
10         fi
11         if ! id -u list > /dev/null 2>&1 ; then
12                 adduser --system --home /var/list --ingroup list list
13                 chsh -s /bin/sh list
14         fi
15 fi
16
17 #DEBHELPER#
18
19 # make sure the qfiles directory is empty.
20 if [ -d /var/lib/mailman/qfiles ] && \
21         [ "$(find /var/lib/mailman/qfiles -type f | wc -l)" -ne 0 ]; then
22     # uh-oh.
23     db_fset mailman/queue_files_present seen false || true
24     db_input critical mailman/queue_files_present || true
25     db_go
26     exit 1
27 fi
28
29 exit 0