230187adaa
Since XBMC was renamed to Kodi, upstream is progressively propagating
the rename to directories and files, and in some cases kept a legacy
symlink xbmc->kodi, like /usr/lib/xbmc pointing to /usr/lib/kodi.
In 62165ae
(package/kodi: Fix path to binary in service), the path was
changed to use the new canonical path, but the init script was left out.
This was not seen previously, because of the legacy symlink.
But with the advent of Kodi 17 (Krypton), that legacy symlink is no
more, and the init script no longer works.
Do for the init script what was done two years ago for the service file.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
Cc: Marcus Hoffmann <m.hoffmann@cartelsol.com>
Reviewed-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
40 lines
571 B
Bash
Executable File
40 lines
571 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Starts Kodi
|
|
#
|
|
|
|
BIN=/usr/bin/br-kodi
|
|
KODI=/usr/lib/kodi/kodi.bin
|
|
KODI_ARGS="--standalone -fs -n"
|
|
PIDFILE=/var/run/kodi.pid
|
|
|
|
start() {
|
|
printf "Starting Kodi: "
|
|
start-stop-daemon -S -q -b -m -p $PIDFILE --exec $BIN -- $KODI $KODI_ARGS
|
|
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
|
}
|
|
stop() {
|
|
printf "Stopping Kodi: "
|
|
start-stop-daemon -K -q -p $PIDFILE
|
|
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
|
}
|
|
restart() {
|
|
stop
|
|
start
|
|
}
|
|
|
|
case "$1" in
|
|
start)
|
|
start
|
|
;;
|
|
stop)
|
|
stop
|
|
;;
|
|
restart|reload)
|
|
restart
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
exit 1
|
|
esac
|