summarylogtreecommitdiffstats
path: root/python-carbon.install
blob: 2622c4bce853822a4797cdb5efdc023b92e5e0a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
post_install() {
	if ! getent group carbon > /dev/null; then
		groupadd --system carbon
	fi
	if ! getent passwd carbon > /dev/null; then
		useradd -c "Graphite Carbon Daemons" --system -d /var/lib/carbon -s /usr/bin/nologin -g carbon carbon
		passwd -l carbon > /dev/null
	fi
	mkdir -p /var/lib/carbon
	chown -R carbon:carbon /var/lib/carbon > /dev/null
}

post_upgrade() {
	post_install $1
}