diff --git a/bastion/src/cli/src/commands/serve.ts b/bastion/src/cli/src/commands/serve.ts index a435c92..b3d905d 100644 --- a/bastion/src/cli/src/commands/serve.ts +++ b/bastion/src/cli/src/commands/serve.ts @@ -11,7 +11,7 @@ export function registerStartCommand(parent: Command): void { .command("start") .description("Start the bastion server (HTTP + dnsmasq PXE)") .option("--port ", "HTTP port", "8080") - .option("--dir ", "Bastion data directory", "/tmp/lab-bastion") + .option("--dir ", "Bastion data directory", process.env["BASTION_DIR"] ?? "/tmp/lab-bastion") .option("--domain ", "Internal domain for hostnames", "ad.itaz.eu") .option("--dhcp-mode ", "DHCP mode: proxy or full", "proxy") .option("--fedora ", "Fedora version", "43") diff --git a/bastion/src/cli/src/commands/stop.ts b/bastion/src/cli/src/commands/stop.ts index b1ed687..67ed6d3 100644 --- a/bastion/src/cli/src/commands/stop.ts +++ b/bastion/src/cli/src/commands/stop.ts @@ -8,7 +8,7 @@ export function registerStopCommand(parent: Command): void { parent .command("stop") .description("Stop a running bastion server") - .option("--dir ", "Bastion data directory", "/tmp/lab-bastion") + .option("--dir ", "Bastion data directory", process.env["BASTION_DIR"] ?? "/tmp/lab-bastion") .action((opts: { dir: string }) => { const pidFile = `${opts.dir}/bastion.pid`;