From e9c5dc2930efe98a8c10c75338bea4f535ff0e60 Mon Sep 17 00:00:00 2001
From: Dominik Pfennig <dominik@suma-ev.de>
Date: Tue, 3 May 2016 15:30:36 +0200
Subject: [PATCH] Homestead Server sollte nun aufgesetzt werden, falls er nicht
 vorhanden ist

---
 deploy/checkServerStatus.sh | 27 ++++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)

diff --git a/deploy/checkServerStatus.sh b/deploy/checkServerStatus.sh
index d038728d9..105c7bee7 100755
--- a/deploy/checkServerStatus.sh
+++ b/deploy/checkServerStatus.sh
@@ -20,6 +20,27 @@ then
 	cd ~/MetaGer
 	php artisan key:generate
 fi
-    # Falls notwendig Homestead Server intialisieren:
-  #  - cd ~/
-   # - vagrant box add --provider virtualbox laravel/homestead
\ No newline at end of file
+# Falls notwendig Homestead Server intialisieren:
+if [ ! -d ~/Homestead ]
+then
+	cd ~/
+	# Wir brauchen unseren öffentlichen ssh Schlüssel:
+	if [ ! -d .ssh ]
+	then
+		mkdir .ssh
+		chmod 700 .ssh
+	fi
+	if [ ! -f .ssh/id_rsa.pub ]
+	then
+		cd .ssh
+		ssh-keygen -t rsa -N "" -f id_rsa
+		cd ~/
+	fi
+	vagrant box add laravel/homestead
+	git clone https://github.com/laravel/homestead.git Homestead
+	cd Homestead/
+	bash init.sh
+	mv -f "$path/deploy/Homestead.yaml" .homestead/
+	vagrant up
+	echo "Your server is now running under http://localhost:8000"
+fi
-- 
GitLab