mirror of
https://github.com/octoleo/restic.git
synced 2024-11-26 14:56:29 +00:00
Unmount when closing application from cli
This commit is contained in:
parent
eadfcd3f9e
commit
e44716381c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user