I set this up as a proof of concept and it seems to work - just waiting for my HDHomeRun to arrive.
This starts automatically on Windows boot, but is not resilient.
This won't work with USB tuners unless you can get some kind of USB/IP solution working.
For anyone who wants to try this out here are the steps:
1) Install Windows subsystem for Linux (Ubuntu)
2) open the console and do this:
#get rid of sudo password prompt:
sudo sed -i "s/%sudo.*/%sudo ALL=(ALL:ALL) NOPASSWD:ALL/g" /etc/sudoers
###install tvheadend
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61
echo "deb
https://dl.bintray.com/tvheadend/deb xenial stable-4.2" | sudo tee /etc/apt/sources.list.d/tvheadend.list
sudo apt-get update
sudo apt-get install tvheadend
###edit crontab
sudo apt-get upgrade
sudo crontab -e
(Select nano)
(paste this in there:)
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
@reboot . $HOME/.profile; service tvheadend start
(ctrl-x, save, exit)
###find IP address
###this is just the IP of the host, so
ip a (in linux)
ipconfig /all (windows)
3) open windows firewall for incoming TCP ports 9981, 9982
4) browse to TVH IP from LAN on x.x.x.x:9981 to configure
5) Create a batch file in windows with the following contents:
C:\Windows\System32\bash.exe -c 'while [ true ]; do sudo /usr/sbin/cron -f; done'
6) right click, create shortcut
7) move the shortcut to the startup folder (right click start button, run this to open the folder: "shell:common startup")
That's it. Works for me. It leaves an annoying command prompt window open but I suppose there could be alternative options such as setting it up as a service, using VB scripts, scheduled tasks, health check TVH and restart if necessary etc.