diff options
Diffstat (limited to 'package/kodi/files/kodi.init')
-rw-r--r-- | package/kodi/files/kodi.init | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/package/kodi/files/kodi.init b/package/kodi/files/kodi.init new file mode 100644 index 000000000..b15b1d6d4 --- /dev/null +++ b/package/kodi/files/kodi.init @@ -0,0 +1,30 @@ +#!/bin/sh +#PKG kodi +#INIT 95 + +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${kodi:-NO}" = x"NO" && exit 0 + test x"$kodi" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start + exec sh $0 start + ;; +start) + export LD_LIBRARY_PATH=/opt/vc/lib + xbmc & + ;; +stop) + kill $(pgrep -f /usr/lib/xbmc/xbmc.bin) + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? |