mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +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"
|
LOCKFILE="/var/lock/tvheadend.sleep"
|
||||||
|
|
||||||
|
ADDON_DIR="$HOME/.xbmc/addons/service.multimedia.tvheadend"
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
hibernate|suspend)
|
hibernate|suspend)
|
||||||
if [ "$(pidof tvheadend)" ];then
|
if [ "$(pidof tvheadend)" ];then
|
||||||
progress "Shutting down HTS TVHeadend for suspending..."
|
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
|
tvheadend.stop
|
||||||
touch $LOCKFILE
|
touch $LOCKFILE
|
||||||
for module in $REMOVE_MODULES ; do
|
for module in $REMOVE_MODULES ; do
|
||||||
@ -43,6 +46,7 @@ case "$1" in
|
|||||||
thaw|resume)
|
thaw|resume)
|
||||||
if [ -f "$LOCKFILE" ] ; then
|
if [ -f "$LOCKFILE" ] ; then
|
||||||
progress "Restarting HTS TVHeadend for wakeup..."
|
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
|
for module in $REMOVE_MODULES ; do
|
||||||
modprobe $module
|
modprobe $module
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user