mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-24 08:23:12 +09:00
Write new run scripts during migration
If the old run-master or run-slave scripts are present write the new run-controller and/or run-host scripts.
This commit is contained in:
1 parent
5e2221796a
commit
671ff23085
1 file changed
+19
-1
@@ -305,9 +305,27 @@ async function migrateRename(args) {
|
|||||||
await execFile(`npm${scriptExt}`, ["update"]);
|
await execFile(`npm${scriptExt}`, ["update"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const hasRunMaster = await fs.pathExists("run-master.sh") || await fs.pathExists("run-master.cmd");
|
||||||
|
const hasRunSlave = await fs.pathExists("run-slave.sh") || await fs.pathExists("run-slave.cmd");
|
||||||
|
if (hasRunMaster || hasRunSlave) {
|
||||||
|
logger.info("Writing run scripts");
|
||||||
|
let mode = "standalone";
|
||||||
|
if (!hasRunSlave) { mode = "controller"; }
|
||||||
|
if (!hasRunMaster) { mode = "host"; }
|
||||||
|
await writeScripts(mode);
|
||||||
|
}
|
||||||
|
|
||||||
logger.info(
|
logger.info(
|
||||||
"Migration complete, you may now delete the following left over files and directories (if present):" +
|
"Migration complete, you may now delete the following left over files and directories (if present):" +
|
||||||
"\n- config-master.json\n- config-slave.json\n- logs/master\n- logs/slave\n- logs/cluster-prerename"
|
"\n- config-master.json" +
|
||||||
|
"\n- config-slave.json" +
|
||||||
|
"\n- logs/master" +
|
||||||
|
"\n- logs/slave" +
|
||||||
|
"\n- logs/cluster-prerename" +
|
||||||
|
"\n- systemd/clusteriomaster.service" +
|
||||||
|
"\n- systemd/clusterioslave.service" +
|
||||||
|
"\n- run-master.sh / run-master.cmd" +
|
||||||
|
"\n- run-slave.sh / run-slave.cmd"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user