fix: read gateway token from secret file via bash
This commit is contained in:
@@ -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";
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user