aboutsummaryrefslogtreecommitdiff
path: root/debian/mauvealert-server.postinst
diff options
context:
space:
mode:
authorTelyn <telyn@telynz.uk>2018-01-31 11:30:50 +0000
committerGitHub <noreply@github.com>2018-01-31 11:30:50 +0000
commit9ef70ed3d53e11dacc5d4df4478d5ff452a2dd6d (patch)
treeace44f0ea0a81d7d369df74c3d95c219905e7fa6 /debian/mauvealert-server.postinst
parent0be1fa0ebadf9435a760582d17f47ff96dc0851c (diff)
parent9af0d1761552601db30de7a991d90d64ec6c88f5 (diff)
Merge pull request #6 from BytemarkHosting/release-to-masterHEADmaster
Release to master
Diffstat (limited to 'debian/mauvealert-server.postinst')
-rw-r--r--debian/mauvealert-server.postinst28
1 files changed, 28 insertions, 0 deletions
diff --git a/debian/mauvealert-server.postinst b/debian/mauvealert-server.postinst
new file mode 100644
index 0000000..945cec4
--- /dev/null
+++ b/debian/mauvealert-server.postinst
@@ -0,0 +1,28 @@
+#!/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
+
+#
+# Symlink jquery libraries in.
+#
+if [ -e /usr/share/javascript/jquery -a ! -e /srv/mauvealert/static/javascript/jquery ] ; then
+ ln -s /usr/share/javascript/jquery /srv/mauvealert/static/javascript/
+fi
+
+
+#DEBHELPER#