From 916c859c3867f720afcc121c3cc77dffb8e956b6 Mon Sep 17 00:00:00 2001 From: Mikko Lehto Date: Sat, 22 Sep 2018 20:21:37 +0300 Subject: [PATCH] ttyd: startup script tuning --- bin/ttyd.sh | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/bin/ttyd.sh b/bin/ttyd.sh index ccf2af7..fa3c79e 100755 --- a/bin/ttyd.sh +++ b/bin/ttyd.sh @@ -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() { @@ -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" @@ -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 +