mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-02 07:27:49 +00:00
tvheadend: tvheadend.power: fix sleep & resume
This commit is contained in:
parent
9ca1a322f5
commit
64c96a38e5
@ -26,7 +26,8 @@ ADDON_HOME="$HOME/.xbmc/userdata/addon_data/service.multimedia.hts-tvheadend"
|
||||
ADDON_SETTINGS="$ADDON_HOME/settings.xml"
|
||||
REMOVE_MODULES=`grep REMOVE_MODULES $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"`
|
||||
|
||||
case "$1" in
|
||||
if [ ! "$REMOVE_MODULES" == "" ] ; then
|
||||
case "$1" in
|
||||
hibernate|suspend)
|
||||
if [ "$(pidof tvheadend)" ];then
|
||||
progress "Shutting down HTS TVHeadend for suspending..."
|
||||
@ -38,16 +39,14 @@ case "$1" in
|
||||
;;
|
||||
|
||||
thaw|resume)
|
||||
if [ -f "$LOCKDIR/$LOCKFILE" ];then
|
||||
for module in $REMOVE_MODULES ; do
|
||||
modprobe $module
|
||||
done
|
||||
progress "Restarting HTS TVHeadend for wakeup..."
|
||||
xbmc-send --host=127.0.0.1 -a "XBMC.RunScript(service.multimedia.hts-tvheadend)" &
|
||||
fi
|
||||
;;
|
||||
|
||||
*) exit $NA
|
||||
;;
|
||||
esac
|
||||
|
||||
esac
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user