Joined September 2013
·

Roberto Quintanilla

Mr. at Naranya Studio
·
Monterrey, México
·
·
·

This article helped me indeed!

Polishing up, I found that there's actually an upstart event Vagrant emits each time it mounts a shared folder - called 'vagrant-mounted', along with an environment variable 'MOUNTPOINT=[path]' (see Upstart EventStructure, look up for the 'Environment' section ).

It's possible to have an upstart config file listening to the 'vagrant-mounted' event, and check for the $MOUNTPOINT value... mine went something like this:

start on vagrant-mounted
# ....
pre-start script
  [ $MOUNTPOINT = /vagrant ] || stop
end script
# The rest of the upstart config file....

This will eliminate the need of adding the suggested line to the Vagrantfile, and stick to what's already provided by Vagrant.

Hope this helps!

Achievements
64 Karma
0 Total ProTip Views