Added folder structure generation

This commit is contained in:
Jan Christian Grünhage 2017-04-25 23:13:26 +02:00
parent ce8032f96c
commit d12ea88726
Signed by: jcgruenhage
GPG key ID: 321A67D9EE8BC3E1

View file

@ -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