#!/bin/sh
# you can use this to use the gerealctl attach direct mode to be directly
# invoked after logging in. To use:
# * Add gerealshell to /etc/shells
# * Define your session with "user:" set to the identical string as "name:"
# * Create a dedicated user with that name and its shell set to gerealshell
# * Start the session
# When you ssh session@host, you will be directly connected to the session.
# This is especially easy to use if you add ssh keys to
#   ~user/.ssh/authorized_keys

set -eu

gerealctl attach $(id --user --name)
