fix: handle destroyed logStream in pty, update kiosk URL to https:3333

This commit is contained in:
posimai 2026-03-31 13:37:38 +09:00
parent 991b8f59d8
commit e5f9c30d1e
2 changed files with 3 additions and 2 deletions

View File

@ -139,7 +139,7 @@ wss.on('connection', (ws) => {
setTimeout(() => ptyProc.write(`source ~/.bashrc\n`), 300); setTimeout(() => ptyProc.write(`source ~/.bashrc\n`), 300);
ptyProc.onData((data) => { ptyProc.onData((data) => {
logStream.write(data); if (!logStream.destroyed) logStream.write(data);
if (ws.readyState === 1) ws.send(JSON.stringify({ type: 'output', data })); if (ws.readyState === 1) ws.send(JSON.stringify({ type: 'output', data }));
}); });

View File

@ -11,7 +11,7 @@
set -e set -e
STATION_URL="http://localhost:3000/station" STATION_URL="https://localhost:3333/station"
SERVICE_SRC="$(dirname "$0")/posimai-dev.service" SERVICE_SRC="$(dirname "$0")/posimai-dev.service"
WHOAMI=$(whoami) WHOAMI=$(whoami)
@ -76,6 +76,7 @@ chromium-browser \
--disable-session-crashed-bubble \ --disable-session-crashed-bubble \
--disable-translate \ --disable-translate \
--noerrdialogs \ --noerrdialogs \
--ignore-certificate-errors \
--app=$STATION_URL & --app=$STATION_URL &
EOF EOF
echo " [OK] openbox autostart written to $AUTOSTART_DIR/autostart" echo " [OK] openbox autostart written to $AUTOSTART_DIR/autostart"