Update remote to ESRF computers
This commit is contained in:
@@ -39,7 +39,7 @@ $TERMINAL --title esrf-phonebook -e contacts
|
|||||||
:END:
|
:END:
|
||||||
|
|
||||||
#+begin_src bash :tangle ~/.local/bin/remote-desktop
|
#+begin_src bash :tangle ~/.local/bin/remote-desktop
|
||||||
computer=$(echo -e 'WID21SPEEDGOAT1\nWID24SPEEDGOAT1\nWBM23SPEEDGOAT1\nWMELSPEEDGOAT1\nWID31PC1\nPCOPTRO\nPCMEL1\nPCMEL2\nRNICE\nPCDEHAEZE\nLAPMEL01\nDesktop-W10' | rofi -i -dmenu -no-custom -p 'Computer:' -l 20);
|
computer=$(echo -e 'WID16A1\nWID21SPEEDGOAT1\nWID24SPEEDGOAT1\nWBM23SPEEDGOAT1\nWMELSPEEDGOAT1\nWID31PC1\nPCOPTRO\nPCMEL1\nRNICE\nPCDEHAEZE\nLAPMEL01\nDesktop-W10' | rofi -i -dmenu -no-custom -p 'Computer:' -l 20);
|
||||||
|
|
||||||
if [[ -z "$computer" ]]; then
|
if [[ -z "$computer" ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
@@ -69,12 +69,15 @@ case "$computer" in
|
|||||||
"RNICE" | "PCDEHAEZE")
|
"RNICE" | "PCDEHAEZE")
|
||||||
xfreerdp $proxy_arg $common_arg /d:ESRF /u:dehaeze /p:$(pass esrf.fr/dehaeze | sed -n 1p) /v:$computer.esrf.fr > /tmp/freerdp_${computer}.log 2>&1 & ;;
|
xfreerdp $proxy_arg $common_arg /d:ESRF /u:dehaeze /p:$(pass esrf.fr/dehaeze | sed -n 1p) /v:$computer.esrf.fr > /tmp/freerdp_${computer}.log 2>&1 & ;;
|
||||||
|
|
||||||
"PCMEL1" | "PCMEL2" | "PCOPTRO" | "LAPMEL01")
|
"PCMEL1" | "PCOPTRO" | "LAPMEL01")
|
||||||
xfreerdp $proxy_arg $common_arg /d:ESRF /u:OPPEL /p:TonicPEL /v:$computer.esrf.fr > /tmp/freerdp_${computer}.log 2>&1 & ;;
|
xfreerdp $proxy_arg $common_arg /d:ESRF /u:OPPEL /p:TonicPEL /v:$computer.esrf.fr > /tmp/freerdp_${computer}.log 2>&1 & ;;
|
||||||
|
|
||||||
"WMELSPEEDGOAT1")
|
"WMELSPEEDGOAT1")
|
||||||
xfreerdp $proxy_arg $common_arg /d:ESRF /u:opd23 /p:tonic23 /v:$computer.esrf.fr > /tmp/freerdp_${computer}.log 2>&1 & ;;
|
xfreerdp $proxy_arg $common_arg /d:ESRF /u:opd23 /p:tonic23 /v:$computer.esrf.fr > /tmp/freerdp_${computer}.log 2>&1 & ;;
|
||||||
|
|
||||||
|
"WID16A1")
|
||||||
|
xfreerdp $proxy_arg $common_arg /d:ESRF /u:opid16a /p:tonic16 /v:$computer.esrf.fr > /tmp/freerdp_${computer}.log 2>&1 & ;;
|
||||||
|
|
||||||
"WID31PC1")
|
"WID31PC1")
|
||||||
xfreerdp $proxy_arg $common_arg /d:ESRF /u:opid31 /p:tonic31 /v:$computer.esrf.fr > /tmp/freerdp_${computer}.log 2>&1 & ;;
|
xfreerdp $proxy_arg $common_arg /d:ESRF /u:opid31 /p:tonic31 /v:$computer.esrf.fr > /tmp/freerdp_${computer}.log 2>&1 & ;;
|
||||||
|
|
||||||
@@ -168,56 +171,42 @@ if [ $? -ne 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
remote_loc=""
|
remote_loc=""
|
||||||
passname=""
|
|
||||||
case "$drive" in
|
case "$drive" in
|
||||||
"homelab")
|
"homelab")
|
||||||
remote_loc="thomas@homelab:/srv/storage/" ;;
|
remote_loc="thomas@homelab:/srv/storage/" ;;
|
||||||
"tmp_14_days")
|
"tmp_14_days")
|
||||||
remote_loc="dehaeze@rnice$proxy_arg:/tmp_14_days/"
|
remote_loc="dehaeze@rnice$proxy_arg:/tmp_14_days/" ;;
|
||||||
passname="esrf/dehaeze" ;;
|
|
||||||
"unix_home")
|
"unix_home")
|
||||||
remote_loc="dehaeze@rnice$proxy_arg:/home/esrf/dehaeze/"
|
remote_loc="dehaeze@rnice$proxy_arg:/home/esrf/dehaeze/" ;;
|
||||||
passname="esrf/dehaeze" ;;
|
|
||||||
"monochromators")
|
"monochromators")
|
||||||
remote_loc="dehaeze@rnice$proxy_arg:/data/monochromators/"
|
remote_loc="dehaeze@rnice$proxy_arg:/data/monochromators/" ;;
|
||||||
passname="esrf/dehaeze" ;;
|
|
||||||
"data_mel")
|
"data_mel")
|
||||||
remote_loc="opid00@lmellab$proxy_arg:/data/id00/inhouse/MEL/"
|
remote_loc="opid00@lmellab$proxy_arg:/data/id00/inhouse/" ;;
|
||||||
passname="esrf/opid00" ;;
|
|
||||||
"data_jazzy")
|
"data_jazzy")
|
||||||
remote_loc="dehaeze@rnice$proxy_arg:/gpfs/jazzy/data/"
|
remote_loc="dehaeze@rnice$proxy_arg:/gpfs/jazzy/data/" ;;
|
||||||
passname="esrf/dehaeze" ;;
|
|
||||||
"data_easy")
|
"data_easy")
|
||||||
remote_loc="dehaeze@rnice$proxy_arg:/gpfs/easy/data/"
|
remote_loc="dehaeze@rnice$proxy_arg:/gpfs/easy/data/" ;;
|
||||||
passname="esrf/dehaeze" ;;
|
"data_id16a")
|
||||||
|
remote_loc="blissadm@pico3$proxy_arg:/data/id16a/inhouse1/commissioning/ni_endstation/Speedgoat/" ;;
|
||||||
"data_id31")
|
"data_id31")
|
||||||
remote_loc="opid31@id31$proxy_arg:/data/id31/inhouse/"
|
remote_loc="opid31@id31$proxy_arg:/data/id31/inhouse/" ;;
|
||||||
passname="esrf/opid31" ;;
|
|
||||||
"bliss_mel")
|
"bliss_mel")
|
||||||
remote_loc="blissadm@lmellab$proxy_arg:/users/blissadm/local/"
|
remote_loc="blissadm@lmellab$proxy_arg:/users/blissadm/local/" ;;
|
||||||
passname="esrf/blissadm" ;;
|
"bliss_id16a")
|
||||||
|
remote_loc="blissadm@pico3$proxy_arg:/users/blissadm/local/" ;;
|
||||||
"bliss_id21")
|
"bliss_id21")
|
||||||
remote_loc="blissadm@lid21nano$proxy_arg:/users/blissadm/local/"
|
remote_loc="blissadm@lid21nano$proxy_arg:/users/blissadm/local/" ;;
|
||||||
passname="esrf/blissadm" ;;
|
|
||||||
"bliss_id24")
|
"bliss_id24")
|
||||||
remote_loc="blissadm@foucault$proxy_arg:/users/blissadm/local/"
|
remote_loc="blissadm@foucault$proxy_arg:/users/blissadm/local/" ;;
|
||||||
passname="esrf/blissadm" ;;
|
|
||||||
"groupshare")
|
"groupshare")
|
||||||
mount ~/mnt/groupshare && \
|
mount ~/mnt/groupshare && \
|
||||||
exit ;;
|
exit ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [-z $remote_loc ]
|
if [ -z $remote_loc ]; then
|
||||||
then
|
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
if [-z $passname ]
|
sshfs -o allow_other,user,uid=1000,gid=1000,default_permissions,IdentityFile=/home/thomas/.ssh/id_ed25519 $remote_loc /home/thomas/mnt/$drive
|
||||||
then
|
|
||||||
sshfs -o allow_other,user,uid=1000,gid=1000,default_permissions $remote_loc /home/thomas/mnt/$drive
|
|
||||||
else
|
|
||||||
pass "$passname" | sshfs -o allow_other,user,uid=1000,gid=1000,default_permissions,password_stdin $remote_loc /home/thomas/mnt/$drive
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# sshfs -o allow_other,user,uid=1000,gid=1000,default_permissions $remote_loc /home/thomas/mnt/$drive
|
# sshfs -o allow_other,user,uid=1000,gid=1000,default_permissions $remote_loc /home/thomas/mnt/$drive
|
||||||
|
|||||||
Reference in New Issue
Block a user