r/serterm: Deploy serial terminal multiplexer
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.
This commit is contained in:
16
roles/serterm/files/serial-terminal-server-window@.service
Normal file
16
roles/serterm/files/serial-terminal-server-window@.service
Normal file
@@ -0,0 +1,16 @@
|
||||
# vim: set ft=systemd :
|
||||
[Unit]
|
||||
Description=Add serial terminal window for %I
|
||||
Requires=serial-terminal-server.service
|
||||
After=serial-terminal-server.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/local/libexec/serterm/add-window %I
|
||||
ExecStop=/usr/local/libexec/serterm/remove-window %I
|
||||
RemainAfterExit=yes
|
||||
User=serterm
|
||||
Group=serterm
|
||||
|
||||
[Install]
|
||||
WantedBy=serial-terminal-server.service
|
||||
Reference in New Issue
Block a user