fix: read gateway token from secret file via bash

This commit is contained in:
Robert
2026-04-04 17:49:39 -04:00
parent d3f50cdadc
commit c579b07843

View File

@@ -50,18 +50,13 @@ in {
Group = cfg.user;
WorkingDirectory = "/home/${cfg.user}";
ExecStart = ''
${openclawPkg}/bin/openclaw \
node run \
--host ${cfg.gatewayHost} \
--port ${toString cfg.gatewayPort} \
--display-name "${cfg.displayName}"
${pkgs.bash}/bin/bash -c 'export OPENCLAW_GATEWAY_TOKEN=$(cat ${cfg.gatewayTokenFile}) && exec ${openclawPkg}/bin/openclaw node run --host ${cfg.gatewayHost} --port ${toString cfg.gatewayPort} --display-name "${cfg.displayName}"'
'';
Restart = "always";
RestartSec = 5;
};
environment = {
OPENCLAW_GATEWAY_TOKEN_FILE = cfg.gatewayTokenFile;
NODE_ENV = "production";
};
};