From afbfeef4d2c6d8c3c91dd849737eefbbafa4b376 Mon Sep 17 00:00:00 2001 From: fabian Date: Sun, 17 Sep 2023 14:43:11 +0200 Subject: [PATCH 1/2] =?UTF-8?q?Revert=20"mount=20unabh=C3=A4ngig=20von=20d?= =?UTF-8?q?er=20clientmaschine"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 937fe0142d2a3c93b6d44ece096c3a4cc68f4b5e. --- scripts/mount_edi.sh | 4 +--- scripts/mount_garrus.sh | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/mount_edi.sh b/scripts/mount_edi.sh index 8e8b006..9ed5648 100755 --- a/scripts/mount_edi.sh +++ b/scripts/mount_edi.sh @@ -3,6 +3,4 @@ set -euo pipefail source /sync/scripts/mount_general.sh -user=$(whoami) - -sshMount edi edi $user FabisDokumente +sshMount edi edi fabian FabisDokumente diff --git a/scripts/mount_garrus.sh b/scripts/mount_garrus.sh index 5186a33..1f99015 100755 --- a/scripts/mount_garrus.sh +++ b/scripts/mount_garrus.sh @@ -3,6 +3,4 @@ set -euo pipefail source /sync/scripts/mount_general.sh -user=$(whoami) - -sshMount fabian garrus $user FabisDokumente media Filme +sshMount fabian garrus fabian FabisDokumente media Filme From 784818b510b70a48eec21f2aa5b1fa251246bfd4 Mon Sep 17 00:00:00 2001 From: fabian Date: Sun, 17 Sep 2023 14:43:44 +0200 Subject: [PATCH 2/2] =?UTF-8?q?mount=20unabh=C3=A4ngig=20der=20clientmasch?= =?UTF-8?q?ine?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/mount_general.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/mount_general.sh b/scripts/mount_general.sh index 6e87eba..8519483 100644 --- a/scripts/mount_general.sh +++ b/scripts/mount_general.sh @@ -2,10 +2,13 @@ set -euo pipefail sshMount () { + clientUser=$(whoami); + serverUser=$1; + serverHost=$2; + shift 2; args=($@) - args=(${args[@]:2}) for ((i=0; i < ${#args[@]}; i=i + 2)); do - sshfs $1@$2:/citadel/${args[$i]}/ /home/fabian/${args[$i + 1]}/ -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=8 + sshfs ${serverUser}@${serverHost}:/citadel/${args[$i]}/ /home/${clientUser}/${args[$i + 1]}/ -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=8 done }