From 966ded762ea0c97f32ffb71fc4dc1d774dfc6e8d Mon Sep 17 00:00:00 2001 From: David Duque Date: Wed, 17 Feb 2021 12:17:10 +0000 Subject: [PATCH] vagrant: Add on-start provisioner Allows for faster deployments/start times --- Vagrantfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 6ed9dd8..8061f82 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,4 +1,4 @@ - + # -*- mode: ruby -*- # vi: set ft=ruby : @@ -25,7 +25,7 @@ Vagrant.configure("2") do |config| config.vm.synced_folder ".", "/vagrant", nfs_version: "3" #, :mount_options => ["ro"] - config.vm.provision :shell, :inline => <<-SH + config.vm.provision "shell", :inline => <<-SH # Set environment variables so that the setup script does # not ask any questions during provisioning. We'll let the # machine figure out its own public IP. @@ -37,5 +37,10 @@ Vagrant.configure("2") do |config| # Start the setup script. cd /vagrant setup/start.sh + # After setup is done, fully open the ssh ports again + ufw allow ssh SH -end \ No newline at end of file + config.vm.provision "shell", run: "always", :inline => <<-SH + service mailinabox restart +SH +end