Implement MongoDB autostart and GC watching

Windows's implementation of enable_grasscutter_watcher works just fine.
systemd is pretty much standart for handling services.
No "sudo" or "pkexec" is needed, systemd does that automatically, but
since the user needs to authenticate, we can’t await service_status.
This commit is contained in:
fnrir
2023-08-18 13:45:07 +02:00
parent b179ccc1f0
commit 2c07cf90bd
5 changed files with 90 additions and 18 deletions

View File

@@ -216,7 +216,7 @@ export default class ServerLaunchSection extends React.Component<IProps, IState>
process: proc_name || grasscutter_jar,
})
// Check if MongoDB is running and start it if not
await invoke('service_status', { service: 'MongoDB' })
invoke('service_status', { service: 'MongoDB' })
}
let jarFolder = config.grasscutter_path