From 5e6be8673a694e6fe8158f39ac81b7dfdf91cd1c Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Mon, 13 Nov 2017 14:50:07 +0000 Subject: [PATCH] Add postinst for user creation (#25) --- debian/coredns.postinst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 debian/coredns.postinst diff --git a/debian/coredns.postinst b/debian/coredns.postinst new file mode 100644 index 0000000..6225e5b --- /dev/null +++ b/debian/coredns.postinst @@ -0,0 +1,16 @@ +#!/bin/sh + +set -e + +case "$1" in + configure) + if ! getent passwd coredns > /dev/null; then + adduser --system --disabled-password --disabled-login --home /var/lib/coredns \ + --quiet --force-badname --group coredns + fi + ;; +esac + +#DEBHELPER# + +exit 0