Skip to content

Commit

Permalink
ttyd: startup script tuning
Browse files Browse the repository at this point in the history
  • Loading branch information
mslehto committed Sep 22, 2018
1 parent 14661ed commit 916c859
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions bin/ttyd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ PORT=2620
CLIENTRECONNECTTIME=10
MAXCLIENTS=2
ONCE=--once
TTYD=/usr/local/bin/ttyd
CMD="/usr/local/bin/tmux attach-session -t ttyc"
#CREDENTIAL="--credential user:pass"
INFO=7
NOTICE=6
DEBUG="--debug $NOTICE"
#DEBUG="--debug $NOTICE"
DEBUG="--debug $INFO"

timestamp()
{
Expand All @@ -20,7 +22,8 @@ timestamp()

ARGS="$DEBUG --interface $IF --port $PORT --readonly --reconnect $CLIENTRECONNECTTIME --max-clients $MAXCLIENTS $CREDENTIAL $ONCE $CMD"
printf "$(timestamp) ttyd $ARGS\n"
ttyd $ARGS
#LD_LIBRARY_PATH=/home/mslehto/dev/ttyd/libwebsockets/build/lib
$TTYD $ARGS
rc=$?
printf "$(timestamp) ttyd rc=$rc\n\n"

Expand All @@ -33,3 +36,27 @@ printf "$(timestamp) ttyd rc=$rc\n\n"
#ttyd -d --> silent fail
#ttyd -reaonly --> RW!

# 2017-09-24
# mkdir ttyd && cd ttyd
# mkdir build && cd build
# cmake .. -DLIBWEBSOCKETS_INCLUDE_DIR="/home/mslehto/dev/ttyd/libwebsockets/build/include" -DLIBWEBSOCKETS_LIBRARIES="/home/mslehto/dev/ttyd/libwebsockets/build/lib"

# cmake .. -DLIBWEBSOCKETS_INCLUDE_DIR="/home/mslehto/dev/ttyd/libwebsockets/build/include" -DLIBWEBSOCKETS_LIBDIR="/home/mslehto/dev/ttyd/libwebsockets/build/lib"

# cmake .. -DLIBWEBSOCKETS_INCLUDEDIR="/home/mslehto/dev/ttyd/libwebsockets/build/include" -DLIBWEBSOCKETS_LIBDIR="/home/mslehto/dev/ttyd/libwebsockets/build/lib"


# LWS
#LWS_IPV6=NO
#LWS_INSTALL_BIN_DIR
#LWS_INSTALL_EXAMPLES_DIR
#LWS_INSTALL_INCLUDE_DIR
#LWS_INSTALL_LIB_DIR
#
#cmake .. -DLWS_WITHOUT_TESTAPPS=ON -DLWS_STATIC_PIC=ON -DLWS_UNIX_SOCK=OFF
#
# make && make install

# LD_LIBRARY_PATH=/home/mslehto/dev/ttyd/libwebsockets/build/lib
# /home/mslehto/dev/ttyd/libwebsockets/build/include

0 comments on commit 916c859

Please sign in to comment.