Files
LibreELEC.tv/packages/addons/service/ttyd/source/bin/ttyd.start
Rudi Heitbaum 6374ae37c8 ttyd: enable lib.private via start script LD_LIBRARY_PATH
The libsockets shared library includes plugins that are dlopened
using LD_LIBRARY_PATH unless a plugin directory is set in the
code (this is not the case with ttyd.) Thus
libwebsockets-evlib_uv.so is not found. So use LD_LIBRARY_PATH
to find the plugin.
2023-12-03 12:16:23 +00:00

21 lines
475 B
Bash
Executable File

#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
. /etc/profile
oe_setup_addon service.ttyd
chmod a+x $ADDON_DIR/bin/*
LD_LIBRARY_PATH=$ADDON_DIR/lib.private:$LD_LIBRARY_PATH
if [ "$TTYD_NOLOGIN" = "true" ]; then
TTYD_NOLOGIN="bash"
elif [ "$TTYD_NOLOGIN" = "false" ]; then
TTYD_NOLOGIN="login root"
fi
exec $ADDON_DIR/bin/ttyd -O -T xterm -p ${TTYD_WEBPORT} ${TTYD_NOLOGIN} &>$ADDON_HOME/service.log