#! /bin/sh -e
log() {
    LOG_FILE=/home/lacaisse/kioskserver/install.log
    MSG=$1
    echo "$(date +"%d-%m-%y %T") - $MSG" >> $LOG_FILE
}

apt_helper() {
	APT_CMD=$@
	DEBIAN_FRONTEND=noninteractive \
	APT_LISTCHANGES_FRONTEND=none \
	apt-get -y --allow-downgrades --allow-remove-essential --allow-change-held-packages \
	-o Dpkg::Options::="--force-confdef" \
	-o Dpkg::Options::="--force-confold" \
	$APT_CMD
}
