diff options
author | James Carter <james.carter@bytemark.co.uk> | 2017-08-01 15:56:35 +0100 |
---|---|---|
committer | James Carter <james.carter@bytemark.co.uk> | 2017-08-01 15:56:35 +0100 |
commit | 4eff930c3f01414bb454d7bcb5501827cb60289b (patch) | |
tree | a398edd68c7fd30cf3987538e41e9b4df9f561b8 /debian/mauvealert-server.postinst | |
parent | 0be1fa0ebadf9435a760582d17f47ff96dc0851c (diff) | |
parent | 814ed65fd415cc62b2f6f661a7f6d1629562544b (diff) |
Merge branch '27-package-and-publish-in-gitlab-ci-retire-maker2-job' into 'develop'
Added CI
Closes #27
See merge request !2
Diffstat (limited to 'debian/mauvealert-server.postinst')
-rw-r--r-- | debian/mauvealert-server.postinst | 28 |
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# |