View Single Post
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#10
Originally Posted by Flandry View Post
Yeah that's right. It's a script in ./debian called postinst or <packagename>.postinst that runs after the installation. .......
does it only run when installing using aptitude ?
I dont think my chown command ran when I installed the deb file using dpkg

my postinst.ex file looks like this

Code:
#!/bin/sh

gtk-update-icon-cache -f /usr/share/icons/hicolor
chown -R user /opt/myapp/

set -e

case "$1" in
    configure)
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

exit 0
cheers