lcdproc: add wrapper script to start

This commit is contained in:
Stefan Saraev 2014-03-16 16:52:02 +02:00
parent c0cf56004c
commit 02293ef864
3 changed files with 37 additions and 1 deletions

View File

@ -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() {

View File

@ -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 <http://www.gnu.org/licenses/>.
################################################################################
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

View File

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