summaryrefslogtreecommitdiff
path: root/testing/clamav/install
blob: a2092e815aa3bae677057c4d297d978fe7ca8c72 (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

	chown -R clamav:clamav /var/lib/clamav
	install -o clamav -g clamav -d /run/clamav
	install -o clamav -g clamav -d /var/log/clamav
}

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