summaryrefslogtreecommitdiff
path: root/packaging/debian/samba-server.postinst
blob: b29d2518ccb4b194992af3292101c3bad35d6e73 (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 samba-server/setup-pdc || true

if [ "$RET" = "true" ]; then
	db_get samba-server/realm
	REALM="$RET"

	db_get samba-server/domain
	DOMAIN="$RET"

	db_get samba-server/password
	PASSWORD="$RET"

	db_stop

	/usr/lib/samba/setup/provision --realm="$REALM" --domain="$DOMAIN" --adminpass="$PASSWORD"
else
	db_stop
fi

#DEBHELPER#

exit 0