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