Compare commits

..

2 Commits

Author SHA1 Message Date
784818b510 mount unabhängig der clientmaschine 2023-09-17 14:43:44 +02:00
afbfeef4d2 Revert "mount unabhängig von der clientmaschine"
This reverts commit 937fe0142d.
2023-09-17 14:43:11 +02:00
3 changed files with 7 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -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
}