kolla/docker/nova/nova-ssh/extend_start.sh
Bertrand Lallau c71e8ba8ff Remove all Heka related remaining stuff
Heka has been removed and replaced by fluentd.
Refer to https://review.openstack.org/#/c/437874/

Change-Id: I989e5d71b5ba4d036dd45c02b3923c5bf27a04ed
2017-05-29 01:42:20 +00:00

17 lines
401 B
Bash

#!/bin/bash
SSH_HOST_KEY_TYPES=( "rsa" "dsa" "ecdsa" "ed25519" )
for key_type in ${SSH_HOST_KEY_TYPES[@]}; do
KEY_PATH=/etc/ssh/ssh_host_${key_type}_key
if [[ ! -f "${KEY_PATH}" ]]; then
ssh-keygen -q -t ${key_type} -f ${KEY_PATH} -N ""
fi
done
mkdir -p /var/lib/nova/.ssh
if [[ $(stat -c %U:%G /var/lib/nova/.ssh) != "nova:nova" ]]; then
chown nova: /var/lib/nova/.ssh
fi