[ui] Add auto-mount on first launch functionality #52
This commit is contained in:
		| @@ -268,7 +268,7 @@ void mgmt_app_config::set_auto_start(bool auto_start) { | |||||||
| #endif // defined(_WIN32) | #endif // defined(_WIN32) | ||||||
|  |  | ||||||
| #if defined(__APPLE__) | #if defined(__APPLE__) | ||||||
|     auto plist_path = utils::file::file{ |     auto file = utils::file::file{ | ||||||
|         utils::path::combine("~", {"/Library/LaunchAgents", label}), |         utils::path::combine("~", {"/Library/LaunchAgents", label}), | ||||||
|     }; |     }; | ||||||
|     if (auto_start) { |     if (auto_start) { | ||||||
| @@ -280,7 +280,7 @@ void mgmt_app_config::set_auto_start(bool auto_start) { | |||||||
|       }; |       }; | ||||||
|       cfg.keep_alive = false; |       cfg.keep_alive = false; | ||||||
|       cfg.label = "com.fifthgrid.blockstorage.repertory.ui"; |       cfg.label = "com.fifthgrid.blockstorage.repertory.ui"; | ||||||
|       cfg.plist_path = plist_path; |       cfg.plist_path = file.get_path(); | ||||||
|       cfg.run_at_load = true; |       cfg.run_at_load = true; | ||||||
|       cfg.stderr_log = "/tmp/repertory_ui.err"; |       cfg.stderr_log = "/tmp/repertory_ui.err"; | ||||||
|       cfg.stdout_log = "/tmp/repertory_ui.out"; |       cfg.stdout_log = "/tmp/repertory_ui.out"; | ||||||
| @@ -293,7 +293,7 @@ void mgmt_app_config::set_auto_start(bool auto_start) { | |||||||
|             function_name, utils::get_last_error_code(), |             function_name, utils::get_last_error_code(), | ||||||
|             "failed to create auto-start entry|name|repertory"); |             "failed to create auto-start entry|name|repertory"); | ||||||
|       } |       } | ||||||
|     } else if (plist_path.remove()) { |     } else if (file.remove()) { | ||||||
|       utils::error::handle_info(function_name, |       utils::error::handle_info(function_name, | ||||||
|                                 "removed auto-start entry|name|repertory"); |                                 "removed auto-start entry|name|repertory"); | ||||||
|     } else { |     } else { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user