Im looking for a solution to an issue regarding tmux. One of my scripts ns2server stopped working recently when running start (using tmux) but not in debug mode (not using tmux).I found that using tee to get the output of tmux was for some reason stopping Natural Selection 2 server from running. tmux new-session -d -s ${servicename} ${executable} ${parms}|tee -a '${consolelog}'I removed tee and the server started working again.tmux new-session -d -s ${servicename} ${executable} ${parms}There have also been reports that other server scripts do not update the consolelog unless you enter the tmux session and press return.Im guessing there is a better way to send the output of tmux to a file than using tee. Does anyone have any suggestions on this? Thank youProject homepage http://danielgibbs.co.uk/scripts/https://github.com/dgibbs64/linuxgameserversEDIT: I have looked at this answer Is there an equivalent of GNU Screen's log command in tmux?. Although very useful does not quite answer my question. The answer to the other question talks about toggling logging on and off. I require logging to be on by default as soon as a new session is started. Plus I would rather not have to create a .tmux.conf file if this can be avoided. Maybe there is a way for me to script the toggling on by default when the session is started.EDIT: Found a good solutiontmux new-session -d -s ${servicename} ${executable} ${parms}tmux pipe-pane -o -t ${servicename} exec cat >> '${consolelog}'the second line activates logging in the session and sends it to a file.
Tmux log output
linux;bash;shell script;tmux