forked ssh and installed tinc
This commit is contained in:
16
tinc/rootfs/etc/cont-init.d/keygen.sh
Normal file
16
tinc/rootfs/etc/cont-init.d/keygen.sh
Normal file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# ==============================================================================
|
||||
# SSH Host keys
|
||||
# ==============================================================================
|
||||
readonly KEYS_PATH=/data/host_keys
|
||||
|
||||
if ! bashio::fs.directory_exists "${KEYS_PATH}"; then
|
||||
bashio::log.info "Generating host keys..."
|
||||
|
||||
mkdir -p "${KEYS_PATH}"
|
||||
ssh-keygen -A || bashio::exit.nok "Failed to create host keys!"
|
||||
cp -fp /etc/ssh/ssh_host* "${KEYS_PATH}/"
|
||||
else
|
||||
bashio::log.info "Restoring host keys..."
|
||||
cp -fp "${KEYS_PATH}"/* /etc/ssh/
|
||||
fi
|
||||
Reference in New Issue
Block a user