From 76825757628c33ef1b22120ef76cc5d8d73f7b8f Mon Sep 17 00:00:00 2001
From: Dominik Pfennig <dominik@suma-ev.de>
Date: Tue, 3 May 2016 14:09:24 +0200
Subject: [PATCH] =?UTF-8?q?Die=20=C3=9Cberpr=C3=BCfung,=20ob=20der=20Webse?=
 =?UTF-8?q?rver=20l=C3=A4uft=20wurde=20in=20ein=20.sh=20Skript=20ausgelage?=
 =?UTF-8?q?rt?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .gitlab-ci.yml              | 10 ++--------
 deploy/checkServerStatus.sh | 24 ++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 8 deletions(-)
 create mode 100755 deploy/checkServerStatus.sh

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f70f64ad7..67cac2f97 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,14 +8,8 @@ update:
     - which php
     # Pfad zum neu geklonten Repo
     - path=`pwd`
-    - cd ~/
-    # Klone das Repo neu, falls es noch nicht existiert
-    - if [ ! -d ~/MetaGer ] ; then git clone "$path" ; cd ~/MetaGer ; composer update ; chmod -R 777 storage/ bootstrap/cache ; fi
-    # Falls notwendig Laravel-Framework initialisieren:
-    - if [ ! -f .env ] ; then cp .env.example .env ; fi
-    - if [ $(grep "SomeRandomString" .env) ] ; then php artisan key:generate ; fi
-    # Falls notwendig Homestead Server intialisieren:
-    - cd ~/
+    - cd ~/MetaGer
+    - ./deploy/checkServerStatus.sh
   script:
     - cd ~/MetaGer
     - git pull "$path"
diff --git a/deploy/checkServerStatus.sh b/deploy/checkServerStatus.sh
new file mode 100755
index 000000000..b450a34d8
--- /dev/null
+++ b/deploy/checkServerStatus.sh
@@ -0,0 +1,24 @@
+# Klone das Repo neu, falls es noch nicht existiert
+if [ ! -d ~/MetaGer ]
+then 
+	cd ~/
+	git clone "$path" 
+	cd ~/MetaGer
+	composer update 
+	chmod -R 777 storage/ bootstrap/cache
+fi
+# Falls notwendig Laravel-Framework initialisieren:
+
+if [ ! -f ~/MetaGer/.env ]
+then 
+	cd ~/MetaGer
+	cp .env.example .env
+fi
+if [ $(grep "SomeRandomString" .env) ]
+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
-- 
GitLab