summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Kluenter <ckluente@thoughtworks.com>2015-09-24 20:36:22 +0200
committerKali Kaneko <kali@leap.se>2015-09-29 10:45:30 -0400
commit0a99d63c71b1a714571bd77c10a2a3dfe6caf04e (patch)
treeb6cb02b8d481efde331fae4a7f3a552bc394d3c4
parent12119af36b2815a13565efcbf7d73629b06a4674 (diff)
[pkg] include script to create user-db
See PR 279
-rwxr-xr-xdebian/rules1
-rw-r--r--debian/soledad-server.install2
-rw-r--r--debian/soledad-server.postinst11
3 files changed, 14 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
index 75310561..88ef50b5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -22,6 +22,7 @@ override_dh_install:
cp common/src/leap/__init__.py debian/soledad-common/usr/local/lib/python$$pv/*-packages/leap/; \
cp common/src/leap/__init__.py debian/soledad-common/usr/local/lib/python$$pv/*-packages/leap/soledad/; \
done
+ dh_install
override_dh_auto_clean:
dh_auto_clean
diff --git a/debian/soledad-server.install b/debian/soledad-server.install
new file mode 100644
index 00000000..01342c4b
--- /dev/null
+++ b/debian/soledad-server.install
@@ -0,0 +1,2 @@
+server/pkg/create-user-db usr/bin/
+debian/soledad-sudoers etc/sudoers.d/
diff --git a/debian/soledad-server.postinst b/debian/soledad-server.postinst
new file mode 100644
index 00000000..19a2b888
--- /dev/null
+++ b/debian/soledad-server.postinst
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+export PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+id soledad-admin > /dev/null
+RET=$?
+
+if [ ! $RET -eq 0 ]; then
+ adduser --system soledad-admin --home /srv/leap/ --disabled-password --shell /bin/sh --ingroup nogroup
+fi
+