restic mount must continue to run in order to serve the contents of that directory.
If you want to run it in the background, you could use:
nohup restic mount >restic-mount.log 2>&1
Though this will not work unless you supply the password using
--password-command, or the
RESTIC_PASSWORD environment variable since it won’t be attached to the terminal to be able to ask for the password interactively.
If you intend this to run all the time as a service, it may be better to create a systemd unit for it.
Note that if you may need to run with
--allow-other if you are sharing the mountpoint with Samba, unless smbd is running as the same user (unlikely).