summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-phosphor/certificate/phosphor-nslcd-cert-config.bb
blob: 7b1e264120a39e1c7f8bd99c015aa99a73b6830c (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
29
30
SUMMARY = "Phosphor certificate manager configuration for a nslcd certificate"

PR = "r1"

LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"

RDEPENDS:${PN} = "phosphor-certificate-manager"

inherit allarch

SRC_URI = "file://env"

FILES:${PN} = "${datadir}"

do_install() {
	install -D ${WORKDIR}/env ${D}/${datadir}/phosphor-certificate-manager/nslcd
}

pkg_postinst:${PN}() {
	LINK="$D$systemd_system_unitdir/multi-user.target.wants/phosphor-certificate-manager@nslcd.service"
	TARGET="../phosphor-certificate-manager@.service"
	mkdir -p $D$systemd_system_unitdir/multi-user.target.wants
	ln -s $TARGET $LINK
}

pkg_prerm:${PN}() {
	LINK="$D$systemd_system_unitdir/multi-user.target.wants/phosphor-certificate-manager@nslcd.service"
	rm $LINK
}