#!/bin/sh set -e # source debconf library . /usr/share/debconf/confmodule case "$1" in configure|reconfigure) # create an aptly-api group and user if ! getent passwd aptly-api > /dev/null; then useradd --system --user-group --create-home --home-dir /var/lib/aptly-api aptly-api fi # set config file permissions not world readable as it may contain secrets chown root:aptly-api /etc/aptly.conf chmod 640 /etc/aptly.conf ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# exit 0