-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.connect
executable file
·52 lines (46 loc) · 2.25 KB
/
.connect
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#diskutil unmount force $HOME/luna
#diskutil unmount force $HOME/res
#diskutil unmount force $HOME/ifs
if [ $(df -h | grep -c "/Users/jonssonp/luna") == 0 ]
then
echo -e 'Mounting luna...'
#mkdir $HOME/luna
#sshfs -o reconnect -o local -o volname=luna -o follow_symlinks -o IdentityFile=/Users/jonssonp/.ssh/id_rsa jonssonp@luna.cbio.mskcc.org: $HOME/luna
sshfs jonssonp@luna.cbio.mskcc.org:/home/jonssonp $HOME/luna \
-o reconnect,ServerAliveInterval=60,ServerAliveCountMax=5,local,follow_symlinks,transform_symlinks,defer_permissions,auto_cache \
-o IdentityFile=/Users/jonssonp/.ssh/id_rsa \
-o volname=luna
fi
#if [ -z $(df -h | grep "/Users/jonssonp/res" | tr -s " " | cut -d" " -f6) ]
#if [ -z $(df -h | grep "/Users/jonssonp/res" | tr -s " " | cut -d" " -f6) ] || \
# [ $(df -h | grep "/Users/jonssonp/res" | tr -s " " | cut -d" " -f6) == 0 ]
#then
# diskutil unmount force $HOME/res
#fi
if [ $(df -h | grep -c "/Users/jonssonp/res") == 0 ]
then
echo -e 'Mounting res...'
#mkdir $HOME/res
sshfs jonssonp@luna.cbio.mskcc.org:/ifs/res/taylorlab/jonssonp $HOME/res \
-o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3,local,follow_symlinks,transform_symlinks,defer_permissions,auto_cache,noappledouble \
-o IdentityFile=/Users/jonssonp/.ssh/id_rsa \
-o volname=res
fi
if [ $(df -h | grep -c "/Users/jonssonp/ifs") == 0 ]
then
echo -e 'Mounting ifs...'
#mkdir $HOME/ifs
sshfs jonssonp@luna.cbio.mskcc.org:/ifs $HOME/ifs \
-o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3,local,follow_symlinks,transform_symlinks,defer_permissions,auto_cache,noappledouble \
-o IdentityFile=/Users/jonssonp/.ssh/id_rsa \
-o volname=ifs
fi
if [ $(df -h | grep -c "/Users/jonssonp/juno") == 0 ]
then
echo -e 'Mounting juno...'
#mkdir $HOME/juno
sshfs jonssonp@juno.mskcc.org:/juno $HOME/juno \
-o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3,local,follow_symlinks,transform_symlinks,defer_permissions,auto_cache,noappledouble \
-o IdentityFile=/Users/jonssonp/.ssh/id_rsa \
-o volname=juno
fi