Tested the script in Vagrant and needed to make a few changes, but it should work now