1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-18 21:51:39 +02:00
pgbackrest/test/vm/ssh/setup.sh
David Steele 8b7fd99637 Added vagrant configuration for Ubuntu 12.04.
Changes to regression tests to work better with VMs.
2015-07-06 21:00:48 -04:00

21 lines
830 B
Bash
Executable File

#!/bin/bash
# Setup backrest test user and trusted SSH access between vagrant and test users
# Copy ssh keys for vagrant user
cp /backrest/test/vm/ssh/config /home/vagrant/.ssh
cp /backrest/test/vm/ssh/id_rsa /home/vagrant/.ssh
cat /backrest/test/vm/ssh/id_rsa.pub >> /home/vagrant/.ssh/authorized_keys
chown -R vagrant:vagrant /home/vagrant/.ssh
chmod 700 /home/vagrant/.ssh
chmod 600 /home/vagrant/.ssh/*
# Create the backrest user and copy ssh keys
adduser --ingroup=vagrant --disabled-password --gecos "" backrest
mkdir /home/backrest/.ssh
cp /backrest/test/vm/ssh/config /home/backrest/.ssh
cp /backrest/test/vm/ssh/id_rsa /home/backrest/.ssh
cp /backrest/test/vm/ssh/id_rsa.pub /home/backrest/.ssh/authorized_keys
chown -R backrest:vagrant /home/backrest/.ssh
chmod 700 /home/backrest/.ssh
chmod 600 /home/backrest/.ssh/*