Using `tmux`, we can spawn a bunch of `picocom` processes for the serial ports connected to other server's console ports. The _serial-terminal-server_ service manages the `tmux` server process, while the individual _serial-terminal-server-window@.service_ units create a window in the `tmux` session. The serial terminal server runs as a dedicated user. The SSH server is configured to force this user to connect to the `tmux` session. This should help ensure the serial consoles are accessible, even if the Active Directory server is unavailable.
9 lines
156 B
Bash
9 lines
156 B
Bash
#!/bin/sh
|
|
# vim: set sw=4 ts=4 sts=4 et :
|
|
|
|
: "${LOG_DIR:=/var/log/serial}"
|
|
|
|
port="$1"
|
|
|
|
exec picocom -b 115200 -g "${LOG_DIR%/}"/"${port##*/}".log "${port}"
|