mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
vdr-addon: suspend/resume: send notifications
This commit is contained in:
parent
cb0148b4a5
commit
961718d13f
@ -29,10 +29,13 @@ REMOVE_MODULES=`grep REMOVE_MODULES $ADDON_SETTINGS | awk '{print $3}' | sed -e
|
||||
|
||||
LOCKFILE="/var/lock/vdr.sleep"
|
||||
|
||||
ADDON_DIR="$HOME/.xbmc/addons/service.multimedia.vdr-addon"
|
||||
|
||||
case "$1" in
|
||||
hibernate|suspend)
|
||||
if [ "$(pidof vdr.bin)" ];then
|
||||
progress "Shutting down vdr for suspending..."
|
||||
xbmc-send -a "Notification(vdr, Shutting down vdr for suspend..., 5000, $ADDON_DIR/icon.png)"
|
||||
vdr.stop
|
||||
touch $LOCKFILE
|
||||
for module in $REMOVE_MODULES ; do
|
||||
@ -43,6 +46,7 @@ case "$1" in
|
||||
thaw|resume)
|
||||
if [ -f "$LOCKFILE" ] ; then
|
||||
progress "Restarting vdr for wakeup..."
|
||||
xbmc-send -a "Notification(vdr, Restarting vdr 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