summaryrefslogtreecommitdiffstats
path: root/satellit_installer/includes/50-install_ldadp.inc
blob: 9dc4847d1f4fed42b6302afc2865196bb168065c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
install_ldadp() {
	# $1: directory to install server to
	local DIR="$1"
	[ -z "$DIR" ] && perror "Pass dir to install_ldadp!"
	echo "# Installing ldadp... "
	git clone --depth 1 git://git.openslx.org/openslx-ng/ldadp.git ldadptmp || perror "Could not clone ldadp repo"
	cd ldadptmp || perror "Could not cd to ldadptmp"
	make || perror "Could not compile ldadp"
	mkdir -p "$DIR" || perror "Could not create $DIR"
	cp ldadp "$DIR" || perror "Could not copy ldadp binary to $DIR"
	cd .. || perror "Could not cd .."
	rm -r ldadptmp # Should we care if fail?
	return 0
}