fix: read gateway token from secret file via bash
This commit is contained in:
@@ -50,18 +50,13 @@ in {
|
|||||||
Group = cfg.user;
|
Group = cfg.user;
|
||||||
WorkingDirectory = "/home/${cfg.user}";
|
WorkingDirectory = "/home/${cfg.user}";
|
||||||
ExecStart = ''
|
ExecStart = ''
|
||||||
${openclawPkg}/bin/openclaw \
|
${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}"'
|
||||||
node run \
|
|
||||||
--host ${cfg.gatewayHost} \
|
|
||||||
--port ${toString cfg.gatewayPort} \
|
|
||||||
--display-name "${cfg.displayName}"
|
|
||||||
'';
|
'';
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
RestartSec = 5;
|
RestartSec = 5;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
OPENCLAW_GATEWAY_TOKEN_FILE = cfg.gatewayTokenFile;
|
|
||||||
NODE_ENV = "production";
|
NODE_ENV = "production";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user