summaryrefslogtreecommitdiffstats
path: root/files/usr/bin/sx
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-10-05 10:08:03 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-10-05 10:08:03 +0200
commit929520e63d9e51ca7e7e51a71d56f476653fef99 (patch)
treef342a3f6e51bd2225c72bf638747c36d38194229 /files/usr/bin/sx
parent96660ef505d3e5763f057c793c29d694d11bf273 (diff)
downloadands-management-master.tar.gz
ands-management-master.tar.bz2
ands-management-master.tar.xz
ands-management-master.zip
Optimize dockerileHEADmaster
Diffstat (limited to 'files/usr/bin/sx')
-rwxr-xr-xfiles/usr/bin/sx30
1 files changed, 30 insertions, 0 deletions
diff --git a/files/usr/bin/sx b/files/usr/bin/sx
new file mode 100755
index 0000000..beac660
--- /dev/null
+++ b/files/usr/bin/sx
@@ -0,0 +1,30 @@
+#!/bin/bash
+export TERM=xterm
+pid=0
+
+function display_container_header {
+ echo "+====================================================="
+ echo "| Container : $HOSTNAME"
+ echo "| OS : $(</etc/redhat-release)"
+ echo "| kubernetes : $KUBERNETES_SERVICE_HOST"
+ echo "| user : $(whoami)"
+ echo "| home : $HOME"
+ echo "+====================================================="
+}
+
+function start_service {
+ echo "+====================================================="
+ echo "| Container $HOSTNAME is now RUNNING"
+ echo "+====================================================="
+ while true
+ do
+ echo "live... (next try in 1 hour)" & sleep 3600
+ done
+}
+
+if [ -n "$HOME" ]; then
+ [ -d "$HOME" ] || mkdir -p $HOME
+fi
+
+display_container_header
+start_service