summarylogtreecommitdiffstats
path: root/bee.install
blob: 5c319522fbf1caf79a222ba24d28de674241a4f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

pre_install() {
	if ! id -u bee > /dev/null 2>&1; then
		useradd --no-create-home --system bee > /dev/null
	fi
	mkdir -p /var/lib/bee
	mkdir -p /etc/bee
}

post_install() {
	chown -R bee:bee /var/lib/bee
}

pre_remove() {
	systemctl stop bee.service
}

post_remove() {
	userdel bee > /dev/null
}