#! /bin/sh -e # postinst script for systraq # http://women.debian.org/wiki/English/MaintainerScripts SYSTRAQUSER=debian-systraq # etch ships 0.0.20050213-8 # lennie 0.0.20081217-1 (?) # squeeze 0.0.20081217-1+squeeze2.1 # wheezy 0.0.20081217-3 # jessie MD5VERSION=0.0.20070301-4 # last version using md5sum by default case "$1" in configure) if ! getent passwd $SYSTRAQUSER > /dev/null 2>&1 then adduser --system --disabled-password --home /var/lib/systraq \ --quiet --group $SYSTRAQUSER fi # be sure to succeed, even in case /var/lib/systraq does not exist. # if user does: install; purge (rm homedir, useraccount kept); install, # homedir will not exist now. see #730407 mkdir -p /var/lib/systraq/filetraq || true chown $SYSTRAQUSER:$SYSTRAQUSER /var/lib/systraq \ /var/lib/systraq/filetraq if ! test -f /var/lib/systraq/.forward then echo root >/var/lib/systraq/.forward chown $SYSTRAQUSER:$SYSTRAQUSER /var/lib/systraq/.forward fi if ! getent group $SYSTRAQUSER >/dev/null 2>&1 then cat <&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. exit 0