#!/usr/bin/env bash
KEY_DIR=/etc/apt/keyrings
sudo wget -qO- https://doozer.io/keys/tvheadend/tvheadend/pgp | sudo tee ${KEY_DIR}/tvheadend.gpg

#sudo sh -c 'echo "deb https://apt.tvheadend.org/unstable stretch main" | tee -a /etc/apt/sources.list-available/tvheadend.list'
sudo sh -c 'echo "deb https://apt.tvheadend.org/unstable xenial main"' | tee -a /etc/apt/sources.list-available/tvheadend.list

sudo ln -sf /etc/apt/sources.list-available/tvheadend.list /etc/apt/sources.list.d/tvheadend.list

sudo apt update
sudo apt install -y tvheadend

sudo service tvheadend restart
