@coworker-jp/aidr 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/cli.mjs +1 -1
- package/src/scheduled.mjs +7 -5
package/package.json
CHANGED
package/src/cli.mjs
CHANGED
package/src/scheduled.mjs
CHANGED
|
@@ -252,11 +252,13 @@ exec ${binaryPath} scan endpoint-info
|
|
|
252
252
|
}
|
|
253
253
|
|
|
254
254
|
async function installCronDir({ binaryPath, dryRun, interval = 4 }) {
|
|
255
|
-
//
|
|
256
|
-
//
|
|
257
|
-
//
|
|
258
|
-
//
|
|
259
|
-
|
|
255
|
+
// The aidr.env file is plain `KEY=VALUE` lines (no `export` prefix —
|
|
256
|
+
// systemd's EnvironmentFile= used by the sentinel service requires that
|
|
257
|
+
// form). Plain `. file` sets shell-local variables that don't propagate
|
|
258
|
+
// to the spawned ai-scanner process; `set -a` flips on auto-export so
|
|
259
|
+
// every assignment becomes an environment variable. Same pattern as the
|
|
260
|
+
// launchd wrapper on macOS.
|
|
261
|
+
const entry = `0 */${interval} * * * root set -a; . ${SYSTEM_ENV_FILE}; set +a; ${binaryPath} scan endpoint-info >> ${SCHEDULED_LOG_FILE} 2>&1
|
|
260
262
|
`;
|
|
261
263
|
if (dryRun) {
|
|
262
264
|
console.log("[dry-run] Would create:", CRON_FILE);
|