diff --git a/packages/sysutils/lcdproc/package.mk b/packages/sysutils/lcdproc/package.mk index 0f940241d7..302481ce24 100644 --- a/packages/sysutils/lcdproc/package.mk +++ b/packages/sysutils/lcdproc/package.mk @@ -55,6 +55,10 @@ post_makeinstall_target() { -e "s|^#GoodBye=\"Thanks for using\"|GoodBye=\"Thanks for using\"|" \ -e "s|^#GoodBye=\" LCDproc!\"|GoodBye=\"$DISTRONAME\"|" \ -i $INSTALL/etc/LCDd.conf + + mkdir -p $INSTALL/usr/lib/openelec + cp $PKG_DIR/scripts/lcd-wrapper $INSTALL/usr/lib/openelec + } post_install() { diff --git a/packages/sysutils/lcdproc/scripts/lcd-wrapper b/packages/sysutils/lcdproc/scripts/lcd-wrapper new file mode 100755 index 0000000000..c6b2e7102a --- /dev/null +++ b/packages/sysutils/lcdproc/scripts/lcd-wrapper @@ -0,0 +1,32 @@ +#!/bin/sh +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv) +# +# OpenELEC 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 of the License, or +# (at your option) any later version. +# +# OpenELEC 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. If not, see . +################################################################################ + +if [ -f /storage/.cache/services/lcdd.conf ]; then + . /storage/.cache/services/lcdd.conf + + if [ "$LCD_DRIVER" == "none" ]; then + exit 0 + fi + + LCDCONF=/etc/LCDd.conf + if [ -f /storage/.config/LCDd.conf ]; then + LCDCONF=/storage/.config/LCDd.conf + fi + exec /usr/sbin/LCDd -f -c $LCDCONF -d $LCD_DRIVER +fi diff --git a/packages/sysutils/lcdproc/system.d/lcdd.service b/packages/sysutils/lcdproc/system.d/lcdd.service index 796ab422ac..2d787d659b 100644 --- a/packages/sysutils/lcdproc/system.d/lcdd.service +++ b/packages/sysutils/lcdproc/system.d/lcdd.service @@ -5,7 +5,7 @@ After=syslog.target [Service] EnvironmentFile=-/storage/.cache/services/lcdd.conf -ExecStart=/bin/sh -c 'LCDCONF=/etc/LCDd.conf; [ -f /storage/.config/LCDd.conf ] && LCDCONF=/storage/.config/LCDd.conf; exec /usr/sbin/LCDd -f -c $LCDCONF -d $LCD_DRIVER' +ExecStart=/bin/sh -c 'exec /usr/lib/openelec/lcd-wrapper' TimeoutStopSec=1s [Install]