File: crossfire-server.postinst

package info (click to toggle)
crossfire 1.75.0-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 24,168 kB
  • sloc: ansic: 83,169; sh: 4,659; perl: 1,736; lex: 1,443; makefile: 1,199; python: 43
file content (45 lines) | stat: -rw-r--r-- 1,006 bytes parent folder | download | duplicates (4)
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
39
40
41
42
43
44
45
#! /bin/sh -e

case "$1" in
  configure)
    if [ ! -e /var/games/crossfire/clockdata ] ; then
	echo -n 0 > /var/games/crossfire/clockdata
	chmod 0644 /var/games/crossfire/clockdata
	chown games:games /var/games/crossfire/clockdata
    fi
    if [ -n "$2" ] && dpkg --compare-versions '1.71.0+dfsg1-2' gt "$2"; then
	chown games:games \
	      /var/log/crossfire \
	      /var/games/crossfire \
	      /var/games/crossfire/datafiles \
	      /var/games/crossfire/players \
	      /var/games/crossfire/temp.maps \
	      /var/games/crossfire/unique-items
    fi
    if [ -n "$2" ] && dpkg --compare-versions '1.75.0-1' gt "$2"; then
	cd /var/games/crossfire
	echo "Converting data files from Python 2 to Python 3"
	runuser -u games -- /usr/libexec/crossfire/cfdb_convert --auto
    fi
    ;;

  abort-upgrade)
    # do nothing
    ;;

  abort-remove)
    # do nothing
    ;;

  abort-deconfigure)
    # do nothing
    ;;

  *)
    echo "$0: incorrect arguments: $*" >&2
    exit 1
    ;;

esac

#DEBHELPER#