summaryrefslogtreecommitdiff
path: root/extra/clamav/clamav.install
blob: 9116dc394fdb7264c69821b37526ec25983479ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
post_install() {
	getent group clamav &>/dev/null || groupadd -r -g 64 clamav >/dev/null
	getent passwd clamav &>/dev/null || useradd -r -u 64 -g clamav -d /dev/null -s /bin/false -c "Clam AntiVirus" clamav >/dev/null

	install -d /var/{log,run}/clamav
	chown clamav:root /var/{log,run}/clamav
	chown -R clamav:clamav /var/lib/clamav
}

post_remove() {
	getent passwd clamav &>/dev/null && userdel clamav >/dev/null
	getent group clamav &>/dev/null && groupdel clamav >/dev/null
	return 0
}