aboutsummaryrefslogtreecommitdiff
path: root/debian/mauvealert-server.postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/mauvealert-server.postinst')
-rw-r--r--debian/mauvealert-server.postinst20
1 files changed, 20 insertions, 0 deletions
diff --git a/debian/mauvealert-server.postinst b/debian/mauvealert-server.postinst
new file mode 100644
index 0000000..3d1c09a
--- /dev/null
+++ b/debian/mauvealert-server.postinst
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+set -e
+
+##
+# Add a mauve user
+##
+RUNASUSER=mauvealert
+
+adduser --system --no-create-home --home /nonexistent $RUNASUSER > /dev/null
+
+##
+# Add default directories
+##
+for i in log lib ; do
+ mkdir -p /var/$i/mauvealert
+ chown -R $RUNASUSER:nogroup /var/$i/mauvealert
+done
+
+#DEBHELPER#