#!/bin/sh # dep-devuan: lsb-base set -e #DEBHELPER# OUT=/dev/null USERNAME=stackbin HOME=/var/stackbin SERVICE=stackbin case "$1" in configure) update-rc.d ${SERVICE} defaults if ! getent passwd ${USERNAME} 1>${OUT} 2>&1 ; then echo "Creating ${USERNAME} system user & group..." adduser --quiet --system --home $HOME \ --disabled-password --group \ --gecos "stackbin system user" \ ${USERNAME} > ${OUT} 2>&1 fi chown ${USERNAME}:${USERNAME} \ ${HOME} ${HOME}/* \ /var/log/${SERVICE} /var/log/${SERVICE}/*log 1>/${OUT} 2>&1 || : ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac exit 0