diff --git a/cmd/restic/cmd_mount.go b/cmd/restic/cmd_mount.go index d06274d00..01ebe7313 100644 --- a/cmd/restic/cmd_mount.go +++ b/cmd/restic/cmd_mount.go @@ -72,6 +72,10 @@ func (cmd CmdMount) Execute(args []string) error { cmd.global.Printf("Now serving %s at %s\n", repo.Backend().Location(), mountpoint) cmd.global.Printf("Don't forget to umount after quitting!\n") + AddCleanupHandler(func() error { + return systemFuse.Unmount(mountpoint) + }) + cmd.ready <- struct{}{} err = fs.Serve(c, &root)