#!/bin/sh

set -e

case "$1" in
    configure)
    
        if test -z "$2"; then 
            update-rc.d glite-ce-blah-parser start 94 3 4 5 . stop 15 3 4 5 . >/dev/null
        
            if [ ! "x`grep tomcat6 /etc/passwd`" == "x" ] ; then
                mkdir -p /var/log/cream/accounting
                chown root.tomcat6 /var/log/cream/accounting
                chmod 0730 /var/log/cream/accounting
        
                mkdir -p /var/blah
                chown tomcat6.tomcat6 /var/blah
                chmod 771 /var/blah
    
            fi
        fi
    ;;

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

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

exit 0

