Browse Source

Added script to close ssh connection on suspend system

master
Damien Broqua 6 months ago
parent
commit
7e870a26f9
  1. 5
      bin/mountMusic.sh
  2. 6
      lib/systemd/system-sleep/close-ssh.sh

5
bin/mountMusic.sh

@ -0,0 +1,5 @@
#! /bin/bash
ssh -f clara -L 2222:dmc-12.mousur.int:22 -N
sshfs -p 2222 dbroqua@127.0.0.1:/srv/dev-disk-by-label-storage/medias/Music ~/Music

6
lib/systemd/system-sleep/close-ssh.sh

@ -0,0 +1,6 @@
#! /bin/bash
if [ "${1}" == "pre" ]; then
umount /home/dbroqua/Music
killall ssh
fi
Loading…
Cancel
Save