sync/scripts/mount_general.sh

15 lines
352 B
Bash
Raw Normal View History

2022-04-28 23:36:42 +02:00
#!/usr/bin/env bash
set -euo pipefail
sshMount () {
2023-09-17 14:43:44 +02:00
clientUser=$(whoami);
serverUser=$1;
serverHost=$2;
shift 2;
2022-04-28 23:36:42 +02:00
args=($@)
for ((i=0; i < ${#args[@]}; i=i + 2)); do
2023-09-17 14:43:44 +02:00
sshfs ${serverUser}@${serverHost}:/citadel/${args[$i]}/ /home/${clientUser}/${args[$i + 1]}/ -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=8
2022-04-28 23:36:42 +02:00
done
}