debian/preinst
changeset 0 586472add385
child 26 767f79e69de1
equal deleted inserted replaced
-1:000000000000 0:586472add385
       
     1 #!/bin/sh
       
     2 # preinst script for mcbot
       
     3 #
       
     4 # see: dh_installdeb(1)
       
     5 
       
     6 set -e
       
     7 
       
     8 # summary of how this script can be called:
       
     9 #        * <new-preinst> `install'
       
    10 #        * <new-preinst> `install' <old-version>
       
    11 #        * <new-preinst> `upgrade' <old-version>
       
    12 #        * <old-preinst> `abort-upgrade' <new-version>
       
    13 # for details, see http://www.debian.org/doc/debian-policy/ or
       
    14 # the debian-policy package
       
    15 
       
    16 
       
    17 case "$1" in
       
    18     install|upgrade)
       
    19 	if [ -x /etc/init.d/mcbot ]; 
       
    20 	then
       
    21 		/etc/init.d/mcbot stop;
       
    22 	fi
       
    23 
       
    24 	if [ -f /var/lib/nobody/.mcbotrc ]; 
       
    25 	then
       
    26 		cp -f /var/lib/nobody/.mcbotrc /var/lib/nobody/.mcbotrc.dpkg-old
       
    27 	fi
       
    28     ;;
       
    29 
       
    30     abort-upgrade)
       
    31     ;;
       
    32 
       
    33     *)
       
    34         echo "preinst called with unknown argument \`$1'" >&2
       
    35         exit 1
       
    36     ;;
       
    37 esac
       
    38 
       
    39 # dh_installdeb will replace this with shell code automatically
       
    40 # generated by other debhelper scripts.
       
    41 
       
    42 #DEBHELPER#
       
    43 
       
    44 exit 0
       
    45 
       
    46