From d12ea887265686485c06fa77381eb0e316ae0ac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?yJan=20Christian=20Gr=C3=BCnhage?= Date: Tue, 25 Apr 2017 23:13:26 +0200 Subject: [PATCH] Added folder structure generation --- root/usr/local/bin/run.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/root/usr/local/bin/run.sh b/root/usr/local/bin/run.sh index 15b965b..98a6130 100755 --- a/root/usr/local/bin/run.sh +++ b/root/usr/local/bin/run.sh @@ -9,7 +9,12 @@ function updateIDs { function writeAuthKeys { mkdir -p /home/borg/.ssh/ cd /home/borg/.ssh/ + + #Generate the authorized keys file borgocli generate authorized_keys /backup/config/hosts.json > authorized_keys + #Create the folder structure + borgocli generate folders /backup/config/hosts.json + chown -R borg:borg . chmod 700 . chmod 700 .. @@ -22,8 +27,10 @@ function writeHostKeys { for f in ssh_host_*; do cp -f $f /etc/ssh/ done + #Generate missing host keys ssh-keygen -A + #Copy host keys to volume cd /etc/ssh/ for f in ssh_host_*; do