Added ssh-manager installation to bootstrap

This commit is contained in:
Eric Renfro 2024-03-15 21:14:32 -04:00
parent 0f1aabf380
commit 8fc750b24b
Signed by: psi-jack
SSH key fingerprint: SHA256:1TKB8Z257L8EHK8GWNxKgMhD8a+FAR+f+j3nnlcuNVM

View file

@ -0,0 +1,19 @@
#!/bin/sh
if [ -z "$SUDO_USER" ] && [ -z "$SSH_CLIENT" ] && [ -z "$SSH_TTY" ]; then
echo "+ Installing ssh-manager"
os=`uname -o`
if [ "$os" == "Darwin" ]; then
curl -fL https://github.com/omegion/ssh-manager/releases/latest/download/ssh-manager-darwin-amd64 -o "$HOME/bin/ssh-manager"
else
curl -fL https://github.com/omegion/ssh-manager/releases/latest/download/ssh-manager-linux-amd64 -o "$HOME/bin/ssh-manager"
fi
chmod a+x "$HOME/bin/ssh-manager"
else
if [ -n "$SUDO_USER" ]; then
echo "Skipping ssh-manager installation due to SUDO usage."
else
echo "Skipping ssh-manager installation due to remote login."
fi
fi