Fix OpenClaw systemd service configuration
This commit is contained in:
parent
da5a408853
commit
416432be17
1 changed files with 2 additions and 2 deletions
|
|
@ -88,6 +88,8 @@ in
|
||||||
"OPENCLAW_WORKSPACE_DIR=${workspaceDir}"
|
"OPENCLAW_WORKSPACE_DIR=${workspaceDir}"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
EnvironmentFile = lib.mkIf (cfg.environmentFile != null) cfg.environmentFile;
|
||||||
|
|
||||||
ExecStartPre = [
|
ExecStartPre = [
|
||||||
"${pkgs.coreutils}/bin/mkdir -p ${configDir} ${dataDir} ${workspaceDir}"
|
"${pkgs.coreutils}/bin/mkdir -p ${configDir} ${dataDir} ${workspaceDir}"
|
||||||
"${pkgs.coreutils}/bin/cp -n /etc/openclaw/openclaw.json ${configDir}/ || true"
|
"${pkgs.coreutils}/bin/cp -n /etc/openclaw/openclaw.json ${configDir}/ || true"
|
||||||
|
|
@ -104,8 +106,6 @@ in
|
||||||
ReadWritePaths = [ configDir dataDir workspaceDir ];
|
ReadWritePaths = [ configDir dataDir workspaceDir ];
|
||||||
NoNewPrivileges = true;
|
NoNewPrivileges = true;
|
||||||
};
|
};
|
||||||
} // lib.optionalAttrs (cfg.environmentFile != null) {
|
|
||||||
serviceConfig.EnvironmentFile = cfg.environmentFile;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue