summaryrefslogtreecommitdiff
path: root/packaging/debian/samba4-server.postinst
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/debian/samba4-server.postinst')
-rw-r--r--packaging/debian/samba4-server.postinst28
1 files changed, 28 insertions, 0 deletions
diff --git a/packaging/debian/samba4-server.postinst b/packaging/debian/samba4-server.postinst
new file mode 100644
index 0000000000..544cc7f555
--- /dev/null
+++ b/packaging/debian/samba4-server.postinst
@@ -0,0 +1,28 @@
+#! /bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+db_get samba4-server/setup-pdc || true
+
+if [ "$RET" = "true" ]; then
+ db_get samba4-server/realm
+ REALM="$RET"
+
+ db_get samba4-server/domain
+ DOMAIN="$RET"
+
+ db_get samba4-server/password
+ PASSWORD="$RET"
+
+ db_stop
+
+ /usr/lib/samba/setup/provision --realm="$REALM" --domain="$DOMAIN" --adminpass="$PASSWORD"
+else
+ db_stop
+fi
+
+#DEBHELPER#
+
+exit 0