summarylogtreecommitdiffstats
path: root/rdircd-git.install
blob: f784151da0081f7d0ad7b35b3671c1362de0efc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
_PKGGROUP=rdircd
_PKGUSER=rdircd

post_install() {
	if ! getent group ${_PKGGROUP} &>/dev/null; then
		groupadd -r ${_PKGGROUP} >/dev/null
	fi
	if ! getent passwd ${_PKGUSER} &>/dev/null; then
		useradd -r -g ${_PKGUSER} -d /var/lib/rdircd -s /bin/false ${_PKGUSER} >/dev/null
	fi
	chmod -R 770 "/var/lib/rdircd/"
	chown -R ${_PKGUSER}:${_PKGGROUP} "/var/lib/rdircd/"
}

post_upgrade() {
	post_install
}