summarylogtreecommitdiffstats
path: root/rwhoisd.install
diff options
context:
space:
mode:
Diffstat (limited to 'rwhoisd.install')
-rw-r--r--rwhoisd.install12
1 files changed, 12 insertions, 0 deletions
diff --git a/rwhoisd.install b/rwhoisd.install
new file mode 100644
index 000000000000..72e579a29381
--- /dev/null
+++ b/rwhoisd.install
@@ -0,0 +1,12 @@
+post_install() {
+ echo "Adding unprivileged system user and group..."
+ useradd -r rwhoisd -c "RWhois Daemon" -d /var/lib/rwhoisd -s /usr/bin/nologin
+ mkdir -p -m 750 /var/log/rwhoisd /var/lib/rwhoisd
+ chown rwhoisd.rwhoisd /var/log/rwhoisd /var/lib/rwhoisd
+}
+
+post_remove() {
+ echo "Removing unprivileged system user and group..."
+ userdel -r rwhoisd &>/dev/null
+}
+