summaryrefslogtreecommitdiffstats
path: root/files/usr/bin/sx
diff options
context:
space:
mode:
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