mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
tvheadend: suspend/resume: send notifications
This commit is contained in:
parent
961718d13f
commit
844d927cc1
@ -28,10 +28,13 @@ REMOVE_MODULES=`grep REMOVE_MODULES $ADDON_SETTINGS | awk '{print $3 }' | sed -e
|
||||
|
||||
LOCKFILE="/var/lock/tvheadend.sleep"
|
||||
|
||||
ADDON_DIR="$HOME/.xbmc/addons/service.multimedia.tvheadend"
|
||||
|
||||
case "$1" in
|
||||
hibernate|suspend)
|
||||
if [ "$(pidof tvheadend)" ];then
|
||||
progress "Shutting down HTS TVHeadend for suspending..."
|
||||
xbmc-send -a "Notification(tvheadend, Shutting down HTS TVHeadend for suspend..., 5000, $ADDON_DIR/icon.png)"
|
||||
tvheadend.stop
|
||||
touch $LOCKFILE
|
||||
for module in $REMOVE_MODULES ; do
|
||||
@ -43,6 +46,7 @@ case "$1" in
|
||||
thaw|resume)
|
||||
if [ -f "$LOCKFILE" ] ; then
|
||||
progress "Restarting HTS TVHeadend for wakeup..."
|
||||
xbmc-send -a "Notification(tvheadend, Restarting HTS TVHeadend for wakeup..., 5000, $ADDON_DIR/icon.png)"
|
||||
for module in $REMOVE_MODULES ; do
|
||||
modprobe $module
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user