]> rtime.felk.cvut.cz Git - sojka/lightdm.git/blob - debian/lightdm.postrm
Launchpad automatic translations update.
[sojka/lightdm.git] / debian / lightdm.postrm
1 #!/bin/sh
2 set -e
3
4 if dpkg-maintscript-helper supports mv_conffile; then
5   dpkg-maintscript-helper mv_conffile \
6     /etc/lightdm.conf \
7     /etc/lightdm/lightdm.conf \
8     0.3.7-0ubuntu2 -- "$@"
9 fi    
10
11 if [ "$1" = "purge" ] ; then
12         rm -f /etc/lightdm.conf
13
14         if [ -d /var/log/lightdm ]; then
15                 rm -r /var/log/lightdm
16         fi
17
18         if [ -d /var/cache/lightdm ]; then
19                 rm -r /var/cache/lightdm
20         fi
21
22         if [ -d /var/run/lightdm/authority ]; then
23                 rm -r /var/run/lightdm/authority
24         fi
25
26         if getent passwd lightdm >/dev/null; then
27                 if [ -x /usr/sbin/deluser ]; then
28                         deluser --system lightdm
29                 fi
30         fi
31
32         if getent group lightdm >/dev/null; then
33                 if [ -x /usr/sbin/delgroup ]; then
34                         delgroup --system lightdm
35                 fi
36         fi
37
38         # we cannot use the --remove-home option when we delete the user above
39         # because it will refuse to remove things in /var, so clean it up this
40         # way
41         if [ -d /var/lib/lightdm ]; then
42                 rm -r /var/lib/lightdm
43         fi
44
45 fi
46 #DEBHELPER#
47 exit 0