From c13437c7e93f55a83f89d7bd217fd94a8174626b Mon Sep 17 00:00:00 2001 From: thomasba Date: Thu, 29 Feb 2024 18:26:15 +0100 Subject: [PATCH] Removed userssh() --- zsh/commands-pc | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/zsh/commands-pc b/zsh/commands-pc index 3c4eab3..cd776b7 100644 --- a/zsh/commands-pc +++ b/zsh/commands-pc @@ -46,19 +46,4 @@ function offlineimap-solve-uuid-problem() { fi } -# ssh to the server a user in located on and change to his directory -function userssh() { - if [[ "$1" =~ "^[a-z][a-z0-9-]+[a-z0-9]$" ]] ; then - SERVER="$(curl -Ss "https://$LIMA_API_KEY@www.lima-city.de/internal_api/users/$1/placement"|jq -r '.user.placement')" - if [ "$SERVER" = "null" ] ; then - echo 'Invalid username!' - else - echo "Connecting to server $SERVER.trafficplex.de ..." - ssh "$SERVER.trafficplex.de" -t "cd /mnt/webhosting/$1/; exec \$SHELL --login" - fi - else - echo 'Invalid username!' - fi -} - # vim: ft=zsh :