#!/bin/bash
#
# see: dh_installdeb(1)

set -e

case "$1" in
    configure)
        # Try systemd first
        if [ -d /run/systemd ]
        then
            if [ ! -e /etc/systemd/system/virt-sandbox.service ]
            then
                /bin/systemctl enable "/lib/systemd/system/virt-sandbox.service" || /bin/true
            fi
	# Assume Upstart
	else
            /sbin/initctl reload-configuration || true
        fi
    ;;

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

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

exit 0
