summaryrefslogtreecommitdiff
path: root/debian/soledad-server.postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/soledad-server.postinst')
-rw-r--r--debian/soledad-server.postinst30
1 files changed, 30 insertions, 0 deletions
diff --git a/debian/soledad-server.postinst b/debian/soledad-server.postinst
new file mode 100644
index 00000000..0f46caf6
--- /dev/null
+++ b/debian/soledad-server.postinst
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+export PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+# create soledad group
+getent group soledad > /dev/null
+RET=$?
+
+if [ ! $RET -eq 0 ]; then
+ addgroup --system soledad
+fi
+
+# create soledad user
+id soledad > /dev/null 2>&1
+RET=$?
+
+if [ ! $RET -eq 0 ]; then
+ adduser --system soledad --no-create-home --home /srv/leap/ --ingroup soledad
+fi
+
+# create soledad-admin user
+id soledad-admin > /dev/null 2>&1
+RET=$?
+
+if [ ! $RET -eq 0 ]; then
+ adduser --system soledad-admin --no-create-home --home /srv/leap/ --ingroup soledad
+fi
+
+
+invoke-rc.d soledad-server start