summaryrefslogtreecommitdiff
path: root/community/couchdb/couchdb.install
blob: 5eff459c78f0ad7457cf21438795400c3ed2ab9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
post_install() {
	id couchdb &>/dev/null || \
		useradd -r -c "CouchDB daemon" -g daemon -d /var/lib/couchdb -s /bin/false couchdb
	mkdir -p /var/run/couchdb
	chown -R couchdb.daemon /etc/couchdb
	chown -R couchdb.daemon /var/{lib,log,run}/couchdb
}

pre_upgrade() {
	id couchdb &>/dev/null || \
		useradd -r -c "CouchDB daemon" -g daemon -d /var/lib/couchdb -s /bin/false couchdb
}

post_upgrade() {
	mkdir -p $pkgdir/var/run/couchdb
	chown -R couchdb.daemon /etc/couchdb
	chown -R couchdb.daemon /var/{lib,log,run}/couchdb
}

post_remove() {
	userdel couchdb &>/dev/null
}