From 1c5141ecee700fb1ebfb6dd4419fe243e0474ff5 Mon Sep 17 00:00:00 2001
From: Nikolaus Krismer <nikolaus.krismer@uibk.ac.at>
Date: Sat, 24 May 2014 01:38:44 +0200
Subject: [PATCH] Some changes to disable local mode on dbis-isochrone
 production server

---
 Vagrantfile | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/Vagrantfile b/Vagrantfile
index d497545f..5761dc35 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -3,6 +3,16 @@
 
 # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
 VAGRANTFILE_API_VERSION = "2"
+HOSTNAME=`hostname -s`
+isLocalMode=true
+
+if HOSTNAME.strip.eql? "dbis-w65107"
+#  puts "Server mode"
+  isLocalMode=false
+else
+#  puts "Local mode"
+  isLocalMode=true
+end
 
 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
   # Enable vagrant-cachier plugin
@@ -27,7 +37,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
   config.vm.synced_folder "etc/vagrant/img", "/setup/img"
 
   # Setup environment on startup (done using a shell script)
-  config.vm.provision "shell", path: "etc/vagrant/bootstrap.sh", args: ["niko", "secretPhdPassword#2014!", "true"]
+  config.vm.provision "shell", path: "etc/vagrant/bootstrap.sh", args: ["niko", "secretPhdPassword#2014!", (isLocalMode ? "true" : "false")]
 
   # Network configuration
   config.vm.network :forwarded_port, guest: 8080, host: 8080, auto_correct: true, id: "tomcat"
-- 
GitLab