Bug#801886: xbmc: systemd support
Ritesh Raj Sarraf
rrs at debian.org
Thu Oct 15 17:22:38 UTC 2015
Control: reassign -1 kodi
Hello Felipe,
On Thu, 2015-10-15 at 13:53 -0300, Felipe Sateler wrote:
> Source: xbmc
>
> I think this should have been kodi ?
>
Yes. Thanks for noticing that.
> > <snip>
>
> > [Unit]
> > Description = Starts instance of Kodi
>
> Please don't use spaces around the = separator. Although systemd
> currently parses that ok, dh-systemd doesn't and it is not part of
> the
> official spec so it may break in the future.
>
Thanks
> > After = systemd-user-sessions.service network.target sound.target
> > mysqld.service
> >
> > [Service]
> > User = kodi
> > Type = simple
> > ExecStart = /usr/bin/kodi-standalone
>
> Does kodi-standalone signal that it is ready somehow? If it has an
> option to daemonize itself, you should use that + Type=forking
> instead.
>
Balint will be in a better position to answer those. But on the RPi,
kodi-standalone runs on Frame Buffer. There is no X server.
kodi-standalone is just a shell script, doing some housekeeping. Here's
the main snippet on how it fires up kodi.
PS: This is just for the sake of conversation here. I don't know if the
same is used in Debian.
while [ $(( $LOOP )) = "1" ]
do
$APP
RET=$?
NOW=$(date +%s)
if [ $(( ($RET >= 64 && $RET <=66) || $RET == 0 )) = "1" ]; then #
clean exit
LOOP=0
else # crash
DIFF=$((NOW-LASTSUCCESSFULSTART))
if [ $(($DIFF > 60 )) = "1" ]; then # Not on startup, ignore
LASTSUCESSFULSTART=$NOW
CRASHCOUNT=0
else # at startup, look sharp
CRASHCOUNT=$((CRASHCOUNT+1))
if [ $(($CRASHCOUNT >= 3)) = "1" ]; then # Too many, bail out
LOOP=0
echo "${APP} has exited uncleanly 3 times in the last ${DIFF}
seconds."
echo "Something is probably wrong"
fi
fi
fi
done
--
Ritesh Raj Sarraf | http://people.debian.org/~rrs
Debian - The Universal Operating System
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-multimedia-maintainers/attachments/20151015/7cd5bb9c/attachment.sig>
More information about the pkg-multimedia-maintainers
mailing list