mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-21 19:25:56 +00:00
Add CoA / Wildcard realm profiles for v0.5.0 (#10)
* Add isolated Wildcard realm profiles and release v0.5.0 * Document realm validation and align npm lock version
This commit is contained in:
1 parent
831685dbd7
commit
1bcef5f8c2
35 files changed
+872
-37
No files matched your search
@@ -80,6 +80,17 @@ fn launcher(root: &Path) -> Result<(PathBuf, PathBuf)> {
|
||||
/// Run a launcher verb to completion (blocking; call from a worker thread).
|
||||
pub fn run(root: &Path, verb: Verb) -> Result<DriverOutcome> {
|
||||
let root = fsx::canonicalize_lenient(root)?;
|
||||
if verb == Verb::StartAll {
|
||||
crate::realms::before_start(&root)?;
|
||||
if root.join("Settings/realm-profile.json").exists() {
|
||||
let db = crate::db::Db::from_repack(&root, crate::db::Account::Admin)?;
|
||||
if !db.ping() {
|
||||
let out = run(&root, Verb::StartMysql)?;
|
||||
if !out.ok { return Ok(out); }
|
||||
}
|
||||
crate::realms::setup_realmlist(&root)?;
|
||||
}
|
||||
}
|
||||
let (python, script) = launcher(&root)?;
|
||||
let mut cmd = Command::new(&python);
|
||||
cmd.arg("-B").arg(&script).arg(verb.arg()).current_dir(&root).stdin(Stdio::null()).stdout(Stdio::piped()).stderr(Stdio::piped());
|
||||
|
||||
Reference in new issue
Block a user