mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-14 05:56:14 +01:00
86aa8e413a
I have restructured the docker build process entirely, the binary gets built outside of the docker build command, now we are managing all dependencies with real Alpine packages and I have dropped features like socat or the cron daemon. Signed-off-by: Thomas Boerger <tboerger@suse.de>
29 lines
871 B
Bash
Executable file
29 lines
871 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if [ ! -d /data/ssh ]; then
|
|
mkdir -p /data/ssh
|
|
fi
|
|
|
|
if [ ! -f /data/ssh/ssh_host_ed25519_key ]; then
|
|
echo "Generating /data/ssh/ssh_host_ed25519_key..."
|
|
ssh-keygen -t ed25519 -b 4096 -f /data/ssh/ssh_host_ed25519_key -N "" > /dev/null
|
|
fi
|
|
|
|
if [ ! -f /data/ssh/ssh_host_rsa_key ]; then
|
|
echo "Generating /data/ssh/ssh_host_rsa_key..."
|
|
ssh-keygen -t rsa -b 2048 -f /data/ssh/ssh_host_rsa_key -N "" > /dev/null
|
|
fi
|
|
|
|
if [ ! -f /data/ssh/ssh_host_dsa_key ]; then
|
|
echo "Generating /data/ssh/ssh_host_dsa_key..."
|
|
ssh-keygen -t dsa -f /data/ssh/ssh_host_dsa_key -N "" > /dev/null
|
|
fi
|
|
|
|
if [ ! -f /data/ssh/ssh_host_ecdsa_key ]; then
|
|
echo "Generating /data/ssh/ssh_host_ecdsa_key..."
|
|
ssh-keygen -t ecdsa -b 256 -f /data/ssh/ssh_host_ecdsa_key -N "" > /dev/null
|
|
fi
|
|
|
|
chown root:root /data/ssh/*
|
|
chmod 0700 /data/ssh
|
|
chmod 0600 /data/ssh/*
|