# arg 1: the new package version post_install() { groupadd -g 42 privoxy &>/dev/null useradd -u 42 -g privoxy -d /var/spool/privoxy -s /bin/false privoxy &>/dev/null chown -R privoxy:privoxy /etc/privoxy /var/log/privoxy } # arg 1: the new package version # arg 2: the old package version post_upgrade() { post_install $1 } # arg 1: the old package version pre_remove() { userdel privoxy &>/dev/null groupdel privoxy &>/dev/null } op=$1 shift $op $*