rename service.sh to moonlight.sh and fix spacing
This commit is contained in:
parent
c8dc3eb0de
commit
ceb7ce5b90
1 changed files with 13 additions and 20 deletions
|
@ -4,13 +4,8 @@
|
|||
|
||||
oe_setup_addon script.moonlight
|
||||
|
||||
chmod a+x $ADDON_DIR/bin/*
|
||||
|
||||
while [ 1 ]
|
||||
do
|
||||
if [ -f $ADDON_DIR/start_moonlight.tmp ]
|
||||
then
|
||||
oe_setup_addon script.moonlight
|
||||
while [ 1 ]; do
|
||||
if [ -f $ADDON_DIR/start_moonlight.tmp ]; then
|
||||
|
||||
MOONLIGHT_APP=`cat $ADDON_DIR/start_moonlight.tmp`
|
||||
|
||||
|
@ -65,7 +60,7 @@ do
|
|||
fi
|
||||
|
||||
if [ "$MOON_MAPPING" != "" ]; then
|
||||
MOONLIGHT_ARG="$MOONLIGHT_ARG -mapping \"${ADDON_DIR}/bin/mappings/${MOON_MAPPING}.conf\""
|
||||
MOONLIGHT_ARG="$MOONLIGHT_ARG -mapping \"${ADDON_DIR}/share/moonlight/mappings/${MOON_MAPPING}.conf\""
|
||||
fi
|
||||
|
||||
if [ "$MOONLIGHT_APP" != "" ]; then
|
||||
|
@ -78,17 +73,15 @@ do
|
|||
MOONLIGHT_ARG="$MOONLIGHT_ARG $MOON_SERVER_IP"
|
||||
fi
|
||||
|
||||
if pgrep "kodi.bin" > /dev/null
|
||||
then
|
||||
if pgrep "kodi.bin" > /dev/null; then
|
||||
systemctl stop kodi
|
||||
fi
|
||||
|
||||
modprobe snd_bcm2835
|
||||
modprobe snd_bcm2835 || :
|
||||
echo $MOONLIGHT_ARG >> $ADDON_LOG_FILE
|
||||
/bin/sh -c "${ADDON_DIR}/bin/moonlight ${MOONLIGHT_ARG} > ${ADDON_LOG_FILE} 2>&1"
|
||||
rmmod snd_bcm2835
|
||||
rmmod snd_bcm2835 || :
|
||||
systemctl start kodi
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
done
|
Loading…
Reference in a new issue