Skip to content

Instantly share code, notes, and snippets.

@jpmens
Created May 3, 2022 06:08
Show Gist options
  • Save jpmens/0152bc4c50a38493941b9559e4a88c0a to your computer and use it in GitHub Desktop.
Save jpmens/0152bc4c50a38493941b9559e4a88c0a to your computer and use it in GitHub Desktop.
systemd unit file to launch instances of gotty
# {{ ansible_managed }}
# by Jan-Piet Mens, May 2021
# MUST be invoked with a two-digit number, e.g.
# systemctl start gotty@01
[Unit]
Description=Gotty Web Terminal %i
After=network.target
[Service]
User=user%i
Group=user%i
WorkingDirectory=/home/user%i
Environment=TERM=xterm-256color
ExecStart=/usr/local/sbin/gotty -p 91%i tmux new-session -A -s user%i
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment