Commit 87fa344e authored by Thomas Goirand's avatar Thomas Goirand

Fix certs_path

parent ad1f4e65
......@@ -5,8 +5,13 @@ set -e
modprobe brd rd_size=1024000 max_part=2 rd_nr=1
passphrase=$(head /dev/urandom | tr -dc "a-zA-Z0-9" | fold -w 32 | head -n 1)
certs_path=$(grep base_cert_dir /etc/octavia/amphora-agent.conf | awk '{print $3}')
if [ -z "${certs_path}" ] ; then
mkdir -p "${certs_path}"
chown octavia:octavia ${certs_path}
echo -n "${passphrase}" | cryptsetup luksFormat /dev/ram0 -
echo -n "${passphrase}" | cryptsetup luksOpen /dev/ram0 certfs-ramfs -
mkfs.ext2 /dev/mapper/certfs-ramfs
mount /dev/mapper/certfs-ramfs "${certs_path}"
mount /dev/mapper/certfs-ramfs ${certs_path}
chown octavia:octavia ${certs_path}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment