diff --git a/Vagrantfile b/Vagrantfile index e37ad90fcea4c63b18870c496bf8f7659f1351fe..ea24726e6638066165aa789fe7c402824885743d 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -88,6 +88,13 @@ Vagrant.configure("2") do |config| cp $CONFIG/.bashrc /home/scodoc/.bashrc su -c "psql -c 'GRANT postgres TO scodoc;'" postgres + echo "configure ssh to scodoc" + cd /home/vagrant + cp -r .ssh /home/scodoc + cd /home/scodoc + chown -R scodoc:scodoc .ssh + echo "%scodoc ALLL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/scodoc + echo 'install development data' su -c "createdb SCODOC_DEV" scodoc rm /opt/scodoc/.env @@ -95,5 +102,10 @@ Vagrant.configure("2") do |config| cd /opt/scodoc yes | tools/restore_scodoc9_data.sh /$CONFIG/SCODOC_DEV.tgz SHELL + + VAGRANT_COMMAND = ARGV[0] + if VAGRANT_COMMAND == "ssh" + config.ssh.username = 'scodoc' + end end