I\'m trying to make nginx load configurations from /vagrant
mounted by vagrant automatically.
So I edited nginx.service to make
I wrote a post how I'm using udev event to restart nginx and php5-fpm.
In short I'm adding /etc/udev/rules.d/50-vagrant-mount.rules
with rule:
SUBSYSTEM=="bdi",ACTION=="add",RUN+="/bin/bash /root/.udev-mount-restart-services.sh"
And the script /root/.udev-mount-restart-services.sh
is:
sleep 5 # wait for a bit for NFS to make sure resources are available
systemctl restart php5-fpm > /dev/null 2>&1
systemctl restart nginx > /dev/null 2>&1