Add sshfs setup

master
Kuba Orlik 3 days ago
parent a56db9263f
commit ac56f85dfd

@ -1 +0,0 @@
kuba@bazzite.6047:1784385156

@ -3,8 +3,9 @@
set -e set -e
set -o xtrace set -o xtrace
source env source ./env
./cec-remote/setup.sh ./cec-remote/setup.sh
./g534-sink-switcher/setup.sh ./g534-sink-switcher/setup.sh
./game-runner/setup.sh ./game-runner/setup.sh
./sshfs/setup.sh kuba@192.168.1.90:/mnt/hdd /var/mnt/hdd

@ -0,0 +1,26 @@
#!/bin/bash
ssh_path=$1 # like kuba@192.168.1.90:/mnt/hdd
mount_path=$2 # like /var/mnt/hdd
service_name=$(echo "$mount_path" | sed 's/\//-/g');
service_name="${service_name:1}"
echo $service_name;
exit
sudo tee "/etc/systemd/system/${service_name}.mount" <<EOF
[Unit]
Description=SSHFS Mount for $ssh_path
After=network-online.target
Wants=network-online.target
[Mount]
What=$ssh_path
Where=$mount_path
Type=fuse.sshfs
Options=IdentityFile=/root/.ssh/id_ed25519,allow_other,reconnect,ServerAliveInterval=15,ServerAliveCountMax=3
TimeoutSec=30
[Install]
WantedBy=multi-user.target
EOF
Loading…
Cancel
Save