#!/bin/sh

set -e

case $1 in
    configure)
        # Configure the permissions of the configuration files
        chown orthanc:orthanc /etc/orthanc/python.json
        chown orthanc:orthanc /etc/orthanc/sample.py
        chmod 0664 /etc/orthanc/python.json
        chmod 0664 /etc/orthanc/sample.py
	;;

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

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

#DEBHELPER#
