diff options
author | Dylan William Hardison <dylan@hardison.net> | 2017-04-14 19:05:03 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2017-04-14 19:10:20 +0200 |
commit | 4a130afba58836ebb2f70a31c88588ea46017009 (patch) | |
tree | 200816c2c7525e76228559e6b0ee81dc46980c14 /vagrant_support/bmo-configured | |
parent | 480bbf368b485a6a0317b9356ce90b75201b3efa (diff) | |
download | bugzilla-4a130afba58836ebb2f70a31c88588ea46017009.tar.gz bugzilla-4a130afba58836ebb2f70a31c88588ea46017009.tar.xz |
Bug 1328874 - Add Vagrantfile for production-like development VMs
Diffstat (limited to 'vagrant_support/bmo-configured')
-rwxr-xr-x | vagrant_support/bmo-configured | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/vagrant_support/bmo-configured b/vagrant_support/bmo-configured new file mode 100755 index 000000000..4d421577b --- /dev/null +++ b/vagrant_support/bmo-configured @@ -0,0 +1,39 @@ +#!/bin/bash + +if [[ ! -f /vagrant/localconfig ]]; then + echo "missing localconfig" + exit 1 +fi + +if [[ ! -f /vagrant/data/params ]]; then + echo "missing data/params" + exit 1 +fi + +if grep -q "'urlbase' => ''" /vagrant/data/params; then + echo "urlbase not configured" + exit 1; +fi + +if grep -q '$db_host.*localhost' /vagrant/localconfig; then + echo "\$db_host not configured" + exit 1 +fi + +for file in /vagrant/data/params /vagrant/index.cgi; do + info="$(stat -c %U.%G "$file")" + + if [[ $info != "vagrant.apache" ]]; then + echo "wrong file owner: $info $file" + exit 1 + fi +done + +cd /vagrant +sudo -u apache perl -T index.cgi &>/tmp/index.html || exit 1 + +grep -q skin-Dusk /tmp/index.html && exit 1 + +rm /tmp/index.html + +exit 0 |