Skip to content

Instantly share code, notes, and snippets.

@un1versal
Last active January 2, 2016 14:09
Show Gist options
  • Save un1versal/8314666 to your computer and use it in GitHub Desktop.
Save un1versal/8314666 to your computer and use it in GitHub Desktop.
Upstart script to start Kodi - It sets nice levels to aid audio
# kodi-upstart
# starts Kodi on startup by using xinit.
# by default runs as xbmc user, to change edit below.
env USER=xbmc
description "Kodi-barebones-upstart-script"
author "Matt Filetto - Tweaked by uNiversal"
start on (filesystem and stopped udevtrigger)
stop on runlevel [016]
# tell upstart to respawn the process if abnormal exit
respawn
respawn limit 10 5
limit nice 21 21
script
exec su -c "xinit /usr/bin/kodi --standalone -- /usr/bin/X -nocursor -bs -nolisten tcp :0" $USER
#exec su -c "xinit /usr/bin/kodi -d --standalone -- -nocursor :0" $USER
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment