File: postinst

package info (click to toggle)
pyicqt 0.8b-5
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 1,016 kB
  • ctags: 1,751
  • sloc: python: 11,539; sh: 177; makefile: 57; xml: 16
file content (38 lines) | stat: -rw-r--r-- 857 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh

set -e

case "$1" in
configure)
	if ! getent passwd pyicqt >/dev/null; then
		adduser --system --disabled-login \
			--no-create-home --home /var/lib/pyicqt \
			--group \
			pyicqt
	fi
	if ! dpkg-statoverride --list /var/lib/pyicqt >/dev/null; then
		chown -R pyicqt:pyicqt    /var/lib/pyicqt
	fi
	if ! dpkg-statoverride --list /var/run/pyicqt >/dev/null; then
		chown pyicqt:pyicqt       /var/run/pyicqt
	fi
	if test -n "$2" && dpkg --compare-versions "$2" le 0.11.1-4; then
		if test -f /var/log/jabber/pyicqt.log*; then
			mv /var/log/jabber/pyicqt.log* /var/log/pyicqt
		fi
	fi
	if ! dpkg-statoverride --list /var/log/pyicqt >/dev/null; then
		chown -R pyicqt:adm       /var/log/pyicqt
	fi
	;;
abort-upgrade|abort-remove|abort-deconfigure)
	;;
*)
	echo "postinst called with unknown argument \`$1'" >&2
	exit 1
	;;
esac

#DEBHELPER#

exit 0