summaryrefslogtreecommitdiff
path: root/packaging/debian/samba4-server.postinst
blob: 544cc7f5558211040049b1a2181cba9d1a19d0f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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