From 5558942fec6d24c862c2e6189790a593718fc497 Mon Sep 17 00:00:00 2001 From: Erin Sims Date: Sat, 1 Oct 2022 04:51:10 -0400 Subject: [PATCH] working on changes, and debugging --- playbooks/sshfs.mount.j2 | 15 +++++++++++++++ playbooks/sshfs.service.j2.old | 19 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 playbooks/sshfs.mount.j2 create mode 100644 playbooks/sshfs.service.j2.old diff --git a/playbooks/sshfs.mount.j2 b/playbooks/sshfs.mount.j2 new file mode 100644 index 0000000..8bad585 --- /dev/null +++ b/playbooks/sshfs.mount.j2 @@ -0,0 +1,15 @@ +[Unit] +Description=SSHFS Daemon +After=network-online.target +Wants=network-online.target + +[Install] +WantedBy=default.target + +[Mount] +Type=fuse.sshfs +What={{ [username,'@',hostname,':',remotepath,item,'/',' ',localpath,item,'/' ]|join() }} +Where={{[ localpath,item,'/']|join() }} +RestartSec=20 +Restart=on-failure + diff --git a/playbooks/sshfs.service.j2.old b/playbooks/sshfs.service.j2.old new file mode 100644 index 0000000..e88345e --- /dev/null +++ b/playbooks/sshfs.service.j2.old @@ -0,0 +1,19 @@ +[Unit] +Description=SSHFS Daemon +After=network-online.target +Wants=network-online.target +StartLimitIntervalSec=300 +StartLimitBurst=10 + +[Install] +WantedBy=default.target + +[Service] +Type=exec +User=sshfs +Group=www-data +ExecStart=/usr/bin/sshfs -p {{sshfsport }} -o allow_root {{ [username,'@',hostname,':',remotepath,item,'/',' ',localpath,item,'/' ]|join() }} +ExecStop=/usr/bin/umount "{{[ localpath,item,'/']|join() }}" +RestartSec=20 +Restart=on-failure +