summaryrefslogtreecommitdiff
path: root/community/lxdm/lxdm.install
diff options
context:
space:
mode:
Diffstat (limited to 'community/lxdm/lxdm.install')
-rw-r--r--community/lxdm/lxdm.install23
1 files changed, 9 insertions, 14 deletions
diff --git a/community/lxdm/lxdm.install b/community/lxdm/lxdm.install
index 3bbb59a2e..a8bc882dc 100644
--- a/community/lxdm/lxdm.install
+++ b/community/lxdm/lxdm.install
@@ -1,22 +1,17 @@
post_install() {
- getent group lxdm >/dev/null && groupmod -g 121 lxdm || groupadd -g 121 lxdm
- getent passwd lxdm >/dev/null && usermod -u 121 -g 121 lxdm || useradd -r -d /var/lib/lxdm -u 121 -g 121 lxdm
- chown -R 121:121 /var/lib/lxdm
- chgrp 121 /etc/lxdm/lxdm.conf
- chmod +r /etc/lxdm/lxdm.conf
- systemd-tmpfiles --create lxdm.conf
+ getent group lxdm > /dev/null 2>&1 && \
+ groupmod -g 121 lxdm > /dev/null 2>&1 || \
+ groupadd -g 121 lxdm
+ getent passwd lxdm > /dev/null 2>&1 && \
+ usermod -c 'Lightweight X11 Display Manager' -u 121 -g 121 -d /var/lib/lxdm -s /sbin/nologin lxdm > /dev/null 2>&1 || \
+ useradd -c 'Lightweight X11 Display Manager' -u 121 -g 121 -d /var/lib/lxdm -s /sbin/nologin lxdm
+ passwd -l lxdm > /dev/null
}
post_upgrade() {
- post_install $1
- if [[ $(vercmp $2 0.4.1-22) < 0 ]]; then
- groupmod -g 121 lxdm
- usermod -g 121 -u 121 lxdm
- fi
+ post_install
}
post_remove() {
- userdel -f lxdm
- groupdel lxdm
- true
+ getent passwd lxdm > /dev/null 2>&1 && userdel lxdm
}