#!/bin/sh AUTORADIO="autoradio" ID="/usr/bin/id" set -e #set -x case "$1" in configure) # fixup older autoradio chown -R root:root /usr/share/autoradio/ chown -R root:root /etc/autoradio/ if $ID $AUTORADIO > /dev/null 2>&1; then : else if ! getent group autoradio > /dev/null 2>&1 ; then addgroup --system autoradio --quiet fi if ! id autoragio > /dev/null 2>&1 ; then adduser --home /usr/share/autoradio/ --gecos autoradio \ --ingroup autoradio --disabled-password --disabled-login \ --no-create-home autoradio fi fi mkdir -p /var/log/autoradio/ mkdir -p /var/run/autoradio/ chown -R $AUTORADIO:$AUTORADIO /var/log/autoradio/ chown -R $AUTORADIO:$AUTORADIO /var/run/autoradio/ ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER#