From cb83d8e282df941d768908eb55f5defbb3657f83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Jerna=C5=9B?= Date: Thu, 12 Mar 2015 14:52:06 +0100 Subject: [PATCH] Add group for diamond at install time Also add a diamond group when installing the Debian package. Fixes python-diamond/Diamond#80 --- debian/postinst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/debian/postinst b/debian/postinst index 81b2767fb..1e3964bd8 100644 --- a/debian/postinst +++ b/debian/postinst @@ -20,8 +20,13 @@ set -e case "$1" in configure) + if ! getent group diamond >/dev/null ; then + addgroup --quiet --system diamond >/dev/null + fi if ! getent passwd diamond >/dev/null; then - adduser --quiet --system --no-create-home --home /var/log/diamond --shell /usr/sbin/nologin diamond + adduser --quiet --system --no-create-home --home /var/log/diamond \ + --ingroup diamond \ + --shell /usr/sbin/nologin diamond fi ;; @@ -47,6 +52,6 @@ chmod -x /usr/bin/diamond chmod +x /usr/bin/diamond # Log / Run directory permissions -chown -R diamond /var/log/diamond +chown -R diamond:diamond /var/log/diamond exit 0