service.ttyd: start script and service fix and improvements

- -W is required since 1.7.4 to disable ttyd read only mode
- one level log history
- simpify ExecStart
- slightly increment timeouts
This commit is contained in:
mglae 2024-03-18 19:30:48 +01:00
parent d9bf06f908
commit 26d1839cb6
2 changed files with 5 additions and 6 deletions

View File

@ -7,8 +7,6 @@
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
@ -17,4 +15,5 @@ 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
[ -f "$ADDON_HOME/service.log" ] && mv -f "$ADDON_HOME/service.log" "$ADDON_HOME/service.old.log"
exec $ADDON_DIR/bin/ttyd -W -O -T xterm -p ${TTYD_WEBPORT} ${TTYD_NOLOGIN} &>$ADDON_HOME/service.log

View File

@ -3,10 +3,10 @@ Description=ttyd
After=graphical.target
[Service]
ExecStart=/bin/sh -c "exec sh /storage/.kodi/addons/service.ttyd/bin/ttyd.start"
TimeoutStopSec=1
ExecStart=/storage/.kodi/addons/service.ttyd/bin/ttyd.start
TimeoutStopSec=2
Restart=always
RestartSec=2
RestartSec=4
StartLimitInterval=0
Type=exec