tools/btmgmt: Return exit status for non-interactive
diff --git a/tools/btmgmt.c b/tools/btmgmt.c
index 122c46d..f60bb8b 100644
--- a/tools/btmgmt.c
+++ b/tools/btmgmt.c
@@ -4416,7 +4416,7 @@
 
 	bt_shell_attach(fileno(stdin));
 	update_prompt(mgmt_index);
-	bt_shell_run();
+	status = bt_shell_run();
 
 	mgmt_cancel_all(mgmt);
 	mgmt_unregister_all(mgmt);