Created
September 3, 2024 13:18
-
-
Save majenkotech/af15280aa5c78e2f9b2c9931b0e53cc8 to your computer and use it in GitHub Desktop.
Systemd service file for ttyNVT connections to terminal servers.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Filename: /etc/conf.d/ttynvt | |
ttyNVT0=192.168.1.23:3001 | |
ttyNVT1=192.168.1.23:3002 | |
ttyNVT2=192.168.1.23:3003 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Filename: /lib/systemd/system/ttynvt@.service | |
[Unit] | |
Description=Virtual network serial ports | |
After=local-fs.target | |
[Service] | |
EnvironmentFile=/etc/conf.d/ttynvt | |
ExecStart=-/usr/bin/ttynvt -f -n %i -r -S $%i | |
Type=simple | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Start the ttynvt service with the key from the config file. That is used as the serial port name. The value associated | |
with the key is then used as the server to connect to. | |
# systemctl enable --now ttynvt@ttyNVT0 | |
# systemctl enable --now ttynvt@ttyNVT1 | |
# systemctl enable --now ttynvt@ttyNVT2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment