barbican/debian/barbican-common.postinst
Douglas Mendizabal d681e6edc7 Clean up debian packaging. Install dependencies from distro repos.
Change-Id: I77a3243382388dae78199f54176e6f8b01e63777
2013-06-27 11:16:56 -05:00

24 lines
568 B
Bash

#!/bin/sh
set -e
if [ "$1" = "configure" ]
then
. /usr/share/debconf/confmodule
if ! getent group barbican > /dev/null 2>&1
then
addgroup --quiet --system barbican >/dev/null
fi
if ! getent passwd barbican > /dev/null 2>&1
then
adduser --quiet --system --home /var/lib/barbican --ingroup barbican --no-create-home --shell /bin/false barbican
fi
chown -R barbican:adm /var/log/barbican/
chmod 0750 /var/log/barbican/
chown barbican:barbican -R /var/lib/barbican/ /etc/barbican/
chmod 0700 /etc/barbican/
fi
#DEBHELPER#