summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2016-01-11 02:18:08 +0100
committerChristian Pointner <equinox@spreadspace.org>2016-01-11 02:18:08 +0100
commit7eacf20f84103483d8b69bc3131435979d498850 (patch)
tree021fa5706dd51ee59bc81cc90f8289d910121622
parentadded missing files (diff)
also create special user for vanity to run as
-rw-r--r--debian/changelog6
-rw-r--r--debian/vanity.postinst12
-rw-r--r--debian/vanity.postrm17
-rw-r--r--debian/vanity.service2
4 files changed, 37 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 5c444a6..fc4c587 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+vanity (0.1.1-2) UNRELEASED; urgency=medium
+
+ * create special user for vanity
+
+ -- Christian Pointner <equinox@spreadspace.org> Mon, 11 Jan 2016 02:17:37 +0100
+
vanity (0.1.1-1) unstable; urgency=medium
* Initial release.
diff --git a/debian/vanity.postinst b/debian/vanity.postinst
new file mode 100644
index 0000000..c6f9aba
--- /dev/null
+++ b/debian/vanity.postinst
@@ -0,0 +1,12 @@
+#!/bin/sh
+# postinst script for vanity
+
+set -e
+
+if [ "$1" = "configure" ]; then
+ adduser --quiet --system --group --no-create-home --home /var/lib/vanity vanity
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/vanity.postrm b/debian/vanity.postrm
new file mode 100644
index 0000000..96bb01d
--- /dev/null
+++ b/debian/vanity.postrm
@@ -0,0 +1,17 @@
+#!/bin/sh
+# postrm script for vanity
+
+set -e
+
+#DEBHELPER#
+
+if [ "$1" = "purge" ] ; then
+ if [ -x "$(command -v deluser)" -a -x "$(command -v delgroup)" ]; then
+ deluser --quiet --system vanity || true
+ delgroup --quiet --system vanity || true
+ else
+ echo "Not removing vanity user and group: adduser package not found." >&2
+ fi
+fi
+
+exit 0
diff --git a/debian/vanity.service b/debian/vanity.service
index c66620b..a22a624 100644
--- a/debian/vanity.service
+++ b/debian/vanity.service
@@ -3,6 +3,8 @@ Description=make go packages gettable
[Service]
ExecStart=/usr/bin/vanity -addr localhost:9192 -repo-root https://git.helsinki.at -vanity-root https://code.helsinki.at
+User=vanity
+Group=vanity
Restart=on-failure
PrivateTmp=yes
PrivateDevices=yes