#!/bin/sh
#
#    Copyright (C) 2009-2010 Canonical Ltd.
#
#    This program is free software; you can redistribute it and/or
#    modify it under the terms of version 2 of the GNU General Public
#    License as published by the Free Software Foundation.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, contact Canonical, Ltd.
#
#
#
(
systemctl enable kodi.service
svdrpsend plug softhddrm DETA
sleep 5
kodi 
timeout 3s systemctl disable kodi.service
killall -9 -r kodi.*
killall -9 -r kodi.*
#svdrpsend plug softhddrm ATTA
killall -9 vdr
killall -9 vdr
##timeout 10s service vdr stop || killall -9 vdr; sleep 1
service vdr start
) > /dev/null 2>&1 &
