Mounting Webdav on Login

What would be the easiest way to Mount a Webdav to a location when you login.
Writing a script with davfs2 that starts when you login seems to be not the best way and it would make secret management hard because i would have to write my password into the script?!

Is there any easier option?

Thank you in advance.

Systemd mount with sops-nix for passwords. Here’s my Samba and Davfs mounts (you can remove the auto mount directive if you want).

1 Like