WEBDAV mount unit

WEBDAV


See https://wiki.archlinux.org/index.php/Davfs2

Install davfs2 from the repo

Sample WEBDAV MOUNT unit

/etc/systemd/system/data-webdav-service.mount

[Unit]
Description=Mount WebDAV Service
After=network-online.target
Wants=network-online.target

[Mount]
What=http(s)://address:<port>/path
Where=/data/webdav/service
Options=rw,_netdev
Type=davfs
TimeoutSec=15

[Install]
WantedBy=multi-user.target

Edit the file /etc/davfs2/secrects and append your webdav service and credentials

http(s)://address:<port>/path    davusername    "davpassword"

Or create a user file at ~/.davfs2/secrets for user specific mounts

Automount unit

/etc/systemd/data-webdav-service.automount

[Unit]
Description=Mount WebDAV Service
After=network-online.target
Wants=network-online.target

[Automount]
Where=/data/webdav
TimeoutIdleSec=300

[Install]
WantedBy=remote-fs.target