Skip to content

Instantly share code, notes, and snippets.

@fahrstuhl
Last active May 1, 2019 11:41
Show Gist options
  • Save fahrstuhl/8a4624aaa75869fab56eb2f3ddc491cd to your computer and use it in GitHub Desktop.
Save fahrstuhl/8a4624aaa75869fab56eb2f3ddc491cd to your computer and use it in GitHub Desktop.
A systemd service file for the virtualhere service on TPCast devices working with OpenTPCast. The service automatically restarts if it crashes.
[Unit]
Description=VirtualHere USB Sharing
Requires=avahi-daemon.service
After=avahi-daemon.service
[Service]
ExecStartPre=/bin/sh -c 'logger VirtualHere settling...;sleep 1s;logger VirtualHere settled'
ExecStart=/usr/sbin/vhusbdtpcast -c /root/config.ini # Don't use -b (https://www.virtualhere.com/node/1005)
Type=idle
Restart=always
RestartSec=5s
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment