#!/bin/sh
set -e

# Automatically added by dhpython:
if which py3compile >/dev/null 2>&1; then
	py3compile -p subiquity /usr/share/subiquity -V 3.3-
fi

# End automatically added section
# Automatically added by dh_installinit
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
	if [ -x "/etc/init.d/subiquity" ]; then
		update-rc.d subiquity defaults >/dev/null || exit $?
	fi
fi
# End automatically added section
# Automatically added by dh_installinit
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
	if [ -x "/etc/init.d/subiquity-debug@" ]; then
		update-rc.d subiquity-debug@ defaults >/dev/null || exit $?
	fi
fi
# End automatically added section
# Automatically added by dh_systemd_start
if [ -d /run/systemd/system ]; then
	systemctl --system daemon-reload >/dev/null || true
	deb-systemd-invoke start subiquity.service >/dev/null || true
fi
# End automatically added section
