From dcfd68db5704d49c50f792397f39a96d3c9f77cf Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Thu, 15 Mar 2012 11:43:03 +0200 Subject: [PATCH] boblightd: add sleep.d/boblightd.power to restart boblightd on sleep/resume --- .../boblightd/source/sleep.d/boblightd.power | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 packages/addons/service/multimedia/boblightd/source/sleep.d/boblightd.power diff --git a/packages/addons/service/multimedia/boblightd/source/sleep.d/boblightd.power b/packages/addons/service/multimedia/boblightd/source/sleep.d/boblightd.power new file mode 100644 index 0000000000..34e79c356c --- /dev/null +++ b/packages/addons/service/multimedia/boblightd/source/sleep.d/boblightd.power @@ -0,0 +1,34 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. /etc/profile + +case "$1" in + hibernate|suspend) + boblightd.stop + ;; + thaw|resume) + xbmc-send --host=127.0.0.1 -a "XBMC.RunScript(service.multimedia.boblightd)" & + ;; + *) exit $NA + ;; +esac