From 1cfbafe4abe6b828f5f0b5f3333a76f4c52d08cd Mon Sep 17 00:00:00 2001 From: dbroqua Date: Wed, 5 Jan 2022 08:05:28 +0100 Subject: [PATCH 1/2] Added script to connect bluetooth headset --- bin/btpair.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 bin/btpair.sh diff --git a/bin/btpair.sh b/bin/btpair.sh new file mode 100755 index 0000000..518670f --- /dev/null +++ b/bin/btpair.sh @@ -0,0 +1,7 @@ +#! /bin/bash + +HEADPHONE="88:D0:39:7D:6A:70" + +bluetoothctl trust ${HEADPHONE} +bluetoothctl disconnect ${HEADPHONE} +bluetoothctl connect ${HEADPHONE} From 7e870a26f9620207c8d38c6e36eb9faa2f7c63f3 Mon Sep 17 00:00:00 2001 From: dbroqua Date: Wed, 5 Jan 2022 08:06:02 +0100 Subject: [PATCH 2/2] Added script to close ssh connection on suspend system --- bin/mountMusic.sh | 5 +++++ lib/systemd/system-sleep/close-ssh.sh | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100755 bin/mountMusic.sh create mode 100755 lib/systemd/system-sleep/close-ssh.sh diff --git a/bin/mountMusic.sh b/bin/mountMusic.sh new file mode 100755 index 0000000..32e70c4 --- /dev/null +++ b/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 diff --git a/lib/systemd/system-sleep/close-ssh.sh b/lib/systemd/system-sleep/close-ssh.sh new file mode 100755 index 0000000..fe3306b --- /dev/null +++ b/lib/systemd/system-sleep/close-ssh.sh @@ -0,0 +1,6 @@ +#! /bin/bash + +if [ "${1}" == "pre" ]; then + umount /home/dbroqua/Music + killall ssh +fi