vdr-addon: suspend/resume: send notifications

This commit is contained in:
Stefan Saraev 2013-04-15 19:34:43 +03:00
parent cb0148b4a5
commit 961718d13f

View File

@ -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