Containerifed knot server
1#!/usr/bin/env sh
2
3mkdir --parents /keys
4
5if [ ! -f /keys/ssh_host_ed25519_key ]
6then
7 ssh-keygen -t ed25519 -f /keys/ssh_host_ed25519_key -N ""
8fi
9
10chmod 600 /keys/ssh_host_ed25519_key
11chmod 644 /keys/ssh_host_ed25519_key.pub
12chown root:root /keys/ssh_host_ed25519_key /keys/ssh_host_ed25519_key.pub
13
14/usr/sbin/sshd -D -h /keys/ssh_host_ed25519_key &
15
16chown git:git /home/git
17exec sudo -u git -E /usr/bin/sh -c "cd /home/git && /usr/libexec/knot server \"$@\""