summaryrefslogtreecommitdiff
path: root/pcr/knot/install
diff options
context:
space:
mode:
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
+}