Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
yankay committed Dec 16, 2021
1 parent 2ad11f0 commit 5fd96c7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.cr-release-packages/
charts/values.yaml
charts/Chart.yaml
podinfo.txt
18 changes: 10 additions & 8 deletions scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@

PODINFO=""

PODINFO+="<p><strong class=\"important\">HOST_NAME:</strong> $(hostname) </strong></p>"
if [ -n $NODE_NAME ]
PODINFO+="<p><strong class=\"important\">HOST_NAME:</strong>$(hostname)</p>"

if [ $NODE_NAME ]
then
PODINFO+="<p><strong class=\"important\">NODE_NAME:</strong> $NODE_NAME </strong></p>"
PODINFO+="<p><strong class=\"important\">NODE_NAME:</strong>$NODE_NAME</p>"
fi
if [ -n $POD_NAME ]
if [ $POD_NAME ]
then
PODINFO+="<p><strong class=\"important\">POD_NAME:</strong> $POD_NAME </strong></p>"
PODINFO+="<p><strong class=\"important\">POD_NAME:</strong>$POD_NAME</p>"
fi
if [ -n $POD_NAMESPACE ]
if [ $POD_NAMESPACE ]
then
PODINFO+="<p><strong class=\"important\">POD_NAMESPACE:</strong> $POD_NAMESPACE </strong></p>"
PODINFO+="<p><strong class=\"important\">POD_NAMESPACE:</strong>$POD_NAMESPACE</p>"
fi
echo sed -i "s+PODINFO+\'$PODINFO\'+g" /usr/share/nginx/html/index.html
echo $PODINFO > podinfo.txt
sed -i "/<div id=\"podinfo\" class=\"game-explanation\">/r podinfo.txt" /usr/share/nginx/html/index.html
nginx -g "daemon off;"

0 comments on commit 5fd96c7

Please sign in to comment.