From 030f3351a1da289a3f9a911929177828315250df Mon Sep 17 00:00:00 2001
From: Richard Allred <richardmallred@gmail.com>
Date: Wed, 12 Jun 2019 14:27:49 +0200
Subject: [PATCH] Adding s2i-scripts directory

---
 s2i-scripts/.s2i/bin/assemble |   41 +++++++++++++++++++++++++++++++++++++++++
 s2i-scripts/index.html        |    1 +
 s2i-scripts/.s2i/bin/run      |    8 ++++++++
 3 files changed, 50 insertions(+), 0 deletions(-)

diff --git a/s2i-scripts/.s2i/bin/assemble b/s2i-scripts/.s2i/bin/assemble
new file mode 100644
index 0000000..7e87289
--- /dev/null
+++ b/s2i-scripts/.s2i/bin/assemble
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+set -e
+
+source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh
+
+echo "---> Enabling s2i support in httpd24 image"
+
+config_s2i
+
+######## CUSTOMIZATION STARTS HERE ############
+
+echo "---> Installing application source"
+cp -Rf /tmp/src/*.html ./
+
+DATE=`date "+%b %d, %Y @ %H:%M %p"`
+
+echo "---> Creating info page"
+echo "Page built on $DATE" >> ./info.html
+echo "Proudly served by Apache HTTP Server version $HTTPD_VERSION" >> ./info.html
+
+######## CUSTOMIZATION ENDS HERE ############
+
+if [ -d ./httpd-cfg ]; then
+  echo "---> Copying httpd configuration files..."
+  if [ "$(ls -A ./httpd-cfg/*.conf)" ]; then
+    cp -v ./httpd-cfg/*.conf "${HTTPD_CONFIGURATION_PATH}"
+    rm -rf ./httpd-cfg
+  fi
+else
+  if [ -d ./cfg ]; then
+    echo "---> Copying httpd configuration files from deprecated './cfg' directory, use './httpd-cfg' instead..."
+    if [ "$(ls -A ./cfg/*.conf)" ]; then
+      cp -v ./cfg/*.conf "${HTTPD_CONFIGURATION_PATH}"
+      rm -rf ./cfg
+    fi
+  fi
+fi
+
+# Fix source directory permissions
+fix-permissions ./
diff --git a/s2i-scripts/.s2i/bin/run b/s2i-scripts/.s2i/bin/run
new file mode 100644
index 0000000..70305a1
--- /dev/null
+++ b/s2i-scripts/.s2i/bin/run
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh
+
+export HTTPD_RUN_BY_S2I=1
+
+# Make Apache show 'debug' level logs during start up
+run-httpd -e debug $@
diff --git a/s2i-scripts/index.html b/s2i-scripts/index.html
new file mode 100644
index 0000000..2ff8dd8
--- /dev/null
+++ b/s2i-scripts/index.html
@@ -0,0 +1 @@
+Hello Class! DO288 rocks!!!

--
Gitblit v1.9.3