mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-25 02:52:13 +08:00
33 lines
679 B
Plaintext
33 lines
679 B
Plaintext
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
|
|
|
|
echo "Enabling systemd service"
|
|
systemctl enable sddm.service
|
|
}
|
|
|
|
post_upgrade() {
|
|
post_install $1
|
|
}
|
|
|
|
pre_remove() {
|
|
echo "Disabling systemd service"
|
|
systemctl disable sddm.service
|
|
}
|
|
|
|
post_remove() {
|
|
if getent passwd sddm >/dev/null; then
|
|
userdel sddm
|
|
fi
|
|
if getent group sddm >/dev/null; then
|
|
groupdel sddm
|
|
fi
|
|
}
|