#!/bin/sh set -e test $DEBIAN_SCRIPT_DEBUG && set -v -x chperms() { # chperms if ! OVERRIDE=`dpkg-statoverride --list $4 2>&1`; then if [ -e $4 ]; then chown $1:$2 $4 chmod $3 $4 fi else # remove old stat-overrides if they're the ones set by the package # this should be removed as soon as >=1.93-2 hits stable if [ "$OVERRIDE" = "$1 $2 $3 $4" ]; then dpkg-statoverride --quiet --remove $4 fi fi } case "$1" in configure|upgrade) if getent passwd debian-transmission > /dev/null; then if ! getent group debian-transmission > /dev/null; then addgroup --system --quiet debian-transmission #fix for missing --group adduser call in 1.40-1 fi else adduser --system --group --no-create-home --quiet debian-transmission fi chperms debian-transmission debian-transmission 4750 /var/lib/transmission-daemon/info chperms debian-transmission debian-transmission 4775 /var/lib/transmission-daemon/downloads chperms debian-transmission debian-transmission 4750 /etc/transmission-daemon/settings.json chperms root debian-transmission 2775 /etc/transmission-daemon ;; esac #DEBHELPER# exit 0;