From a216aa20349be27a469c6b629c405cf43402e0f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Wed, 31 Aug 2022 12:42:47 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20Fix=20install=20of=20kube-ps1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The former method was invalid and didn't work with e.g. screen. --- prepare-vms/lib/commands.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/prepare-vms/lib/commands.sh b/prepare-vms/lib/commands.sh index 11d7af89..97931f76 100644 --- a/prepare-vms/lib/commands.sh +++ b/prepare-vms/lib/commands.sh @@ -492,12 +492,13 @@ _cmd_kubetools() { # Install kube-ps1 pssh " set -e - if ! [ -f /etc/profile.d/kube-ps1.sh ]; then + if ! [ -f /opt/kube-ps1 ]; then cd /tmp git clone https://github.com/jonmosco/kube-ps1 - sudo cp kube-ps1/kube-ps1.sh /etc/profile.d/kube-ps1.sh + sudo mv kube-ps1 /opt/kube-ps1 sudo -u $USER_LOGIN sed -i s/docker-prompt/kube_ps1/ /home/$USER_LOGIN/.bashrc && sudo -u $USER_LOGIN tee -a /home/$USER_LOGIN/.bashrc <