summaryrefslogtreecommitdiff
path: root/pcr/sddm-consolekit/sddm.install
blob: 904a73ac224b647e22432ddd570bfd90bb048486 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
post_install() {
	if ! getent group sddm > /dev/null; then
		groupadd --system sddm
	fi
	if ! getent passwd sddm > /dev/null; then
		useradd -c "Simple Desktop Display Manager" --system -d /var/lib/sddm -s /usr/bin/nologin -g sddm sddm
		passwd -l sddm > /dev/null
	fi
	mkdir -p /var/lib/sddm
	chown -R sddm:sddm /var/lib/sddm > /dev/null
}

post_upgrade() {
	post_install $1
}

post_remove() {
	if getent passwd sddm >/dev/null; then
		userdel sddm
	fi
	if getent group sddm >/dev/null; then
		groupdel sddm
	fi
}