summaryrefslogtreecommitdiff
path: root/pcr/knot/install
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-06-06 16:24:11 -0300
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-06-06 16:24:11 -0300
commitbd4c4c57884f910759693cc1957fa3ca133731d2 (patch)
treed8d1f559e5df260f12e7d1b08761875edbf62dd9 /pcr/knot/install
parentd1e161df4f6111d527c2570958ebaf637411e3e2 (diff)
downloadabslibre-bd4c4c57884f910759693cc1957fa3ca133731d2.tar.gz
abslibre-bd4c4c57884f910759693cc1957fa3ca133731d2.tar.bz2
abslibre-bd4c4c57884f910759693cc1957fa3ca133731d2.zip
knot: authoritative dns server
Diffstat (limited to 'pcr/knot/install')
-rw-r--r--pcr/knot/install12
1 files changed, 12 insertions, 0 deletions
diff --git a/pcr/knot/install b/pcr/knot/install
new file mode 100644
index 000000000..90ece5b42
--- /dev/null
+++ b/pcr/knot/install
@@ -0,0 +1,12 @@
+post_install() {
+ getent group knot &>/dev/null || groupadd -r knot >/dev/null
+ getent passwd knot &>/dev/null || useradd -r -g knot -d /dev/null -s /bin/false -c knot knot >/dev/null
+ chown knot:knot /var/lib/knot
+ chmod 700 /var/lib/knot
+}
+
+post_remove() {
+ getent passwd knot &>/dev/null && userdel knot >/dev/null
+ getent group knot &>/dev/null && groupdel knot >/dev/null
+ true
+}