mirror of
https://github.com/BretFisher/shpod.git
synced 2026-02-14 13:09:50 +00:00
22 lines
709 B
Bash
Executable File
22 lines
709 B
Bash
Executable File
#!/bin/sh
|
|
set -ex
|
|
mkdir /tmp/tailhist
|
|
cd /tmp/tailhist
|
|
WEBSOCKETD_VERSION=0.4.1
|
|
wget https://github.com/joewalnes/websocketd/releases/download/v$WEBSOCKETD_VERSION/websocketd-$WEBSOCKETD_VERSION-linux_amd64.zip
|
|
unzip websocketd-$WEBSOCKETD_VERSION-linux_amd64.zip
|
|
curl https://raw.githubusercontent.com/jpetazzo/container.training/main/prepare-labs/lib/tailhist.html > index.html
|
|
kubectl patch service shpod --namespace shpod -p "
|
|
spec:
|
|
ports:
|
|
- name: tailhist
|
|
port: 1088
|
|
targetPort: 1088
|
|
nodePort: 30088
|
|
protocol: TCP
|
|
"
|
|
./websocketd --port=1088 --staticdir=. sh -c "
|
|
tail -n +1 -f $HOME/.history ||
|
|
echo 'Could not read history file. Perhaps you need to \"chmod +r .history\"?'
|
|
"
|