1
0
Files
misc-containers/jump-box/startup.bash

15 lines
485 B
Bash
Raw Normal View History

2026-09-25 15:40:20 +00:00
#!/bin/bash -e
echo "Setting up target user ${TARGET_USER} (uid=${TARGET_UID}, gid=${TARGET_GID})..."
groupadd --gid "$TARGET_GID" "$TARGET_USER"
2026-09-25 17:21:35 +00:00
# --no-create-home since we assume the home dir will be mounted in the container
adduser --gid "$TARGET_GID" --uid "$TARGET_UID" --no-create-home "$TARGET_USER"
2026-09-25 22:39:52 +00:00
touch /var/log/container-stdout.log
2026-09-25 15:40:20 +00:00
chown "$TARGET_USER":"$TARGET_USER" /var/log/container-stdout.log
echo "Ready."
2026-09-25 17:20:18 +00:00
tail -f /var/log/container-stdout.log &
/usr/sbin/sshd -D