From e0f1d7dc376c1ae76a706bbff66c0d160c2af061 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Wed, 14 Aug 2013 17:52:11 +0200 Subject: [PATCH] Vagrant: Mount /vagrant/var/log/ writable for apache This requires you to run vagrant reload if the vm is already running refs #4549 --- .vagrant-puppet/manifests/finalize.sh | 10 ++++++++-- Vagrantfile | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.vagrant-puppet/manifests/finalize.sh b/.vagrant-puppet/manifests/finalize.sh index 7d095ccb0..cd04ebb7a 100644 --- a/.vagrant-puppet/manifests/finalize.sh +++ b/.vagrant-puppet/manifests/finalize.sh @@ -11,8 +11,8 @@ installJquery () { } mountIcinga2webConfd () { - # Remount /vagrant/config with appropriate permissions since the group apache is missing initially - mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g apache`,dmode=775,fmode=775 /vagrant/config /vagrant/config + # Remount /vagrant/config/ with appropriate permissions since the group apache is missing initially + mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g apache`,dmode=775,fmode=775 /vagrant/config/ /vagrant/config/ } startServicesWithNonLSBCompliantExitStatusCodes () { @@ -21,8 +21,14 @@ startServicesWithNonLSBCompliantExitStatusCodes () { service ido2db-pgsql start || true } +mountIcinga2webVarLog () { + # Remount /vagrant/var/log/ with appropriate permissions since the group apache is missing initially + mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g apache`,dmode=775,fmode=775 /vagrant/var/log/ /vagrant/var/log/ +} + installJquery mountIcinga2webConfd startServicesWithNonLSBCompliantExitStatusCodes +mountIcinga2webVarLog exit 0 diff --git a/Vagrantfile b/Vagrantfile index 99900bc73..c8c279647 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -42,6 +42,7 @@ Vagrant.configure("2") do |config| # the path on the guest to mount the folder. And the optional third # argument is a set of non-required options. config.vm.synced_folder "./config", "/vagrant/config" + config.vm.synced_folder "./var/log", "/vagrant/var/log" # Provider-specific configuration so you can fine-tune various # backing providers for Vagrant. These expose provider-specific options.