Added ssh-manager installation to bootstrap
This commit is contained in:
parent
0f1aabf380
commit
8fc750b24b
1 changed files with 19 additions and 0 deletions
19
.config/yadm/bootstrap.d/ssh-manager
Executable file
19
.config/yadm/bootstrap.d/ssh-manager
Executable 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
|
||||||
|
|
Loading…
Reference in a new issue