Added folder structure generation
This commit is contained in:
parent
ce8032f96c
commit
d12ea88726
|
@ -9,7 +9,12 @@ function updateIDs {
|
||||||
function writeAuthKeys {
|
function writeAuthKeys {
|
||||||
mkdir -p /home/borg/.ssh/
|
mkdir -p /home/borg/.ssh/
|
||||||
cd /home/borg/.ssh/
|
cd /home/borg/.ssh/
|
||||||
|
|
||||||
|
#Generate the authorized keys file
|
||||||
borgocli generate authorized_keys /backup/config/hosts.json > authorized_keys
|
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 .
|
chown -R borg:borg .
|
||||||
chmod 700 .
|
chmod 700 .
|
||||||
chmod 700 ..
|
chmod 700 ..
|
||||||
|
@ -22,8 +27,10 @@ function writeHostKeys {
|
||||||
for f in ssh_host_*; do
|
for f in ssh_host_*; do
|
||||||
cp -f $f /etc/ssh/
|
cp -f $f /etc/ssh/
|
||||||
done
|
done
|
||||||
|
|
||||||
#Generate missing host keys
|
#Generate missing host keys
|
||||||
ssh-keygen -A
|
ssh-keygen -A
|
||||||
|
|
||||||
#Copy host keys to volume
|
#Copy host keys to volume
|
||||||
cd /etc/ssh/
|
cd /etc/ssh/
|
||||||
for f in ssh_host_*; do
|
for f in ssh_host_*; do
|
||||||
|
|
Loading…
Reference in a new issue