Skip to content

Commit

Permalink
Merge pull request #25 from step-security/feature-23
Browse files Browse the repository at this point in the history
Add service log to post step
  • Loading branch information
varunsh-coder authored Nov 30, 2021
2 parents f4e7a3e + eaf0ca8 commit dea7bd5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
10 changes: 10 additions & 0 deletions dist/post/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/post/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions src/cleanup.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as fs from "fs";
import * as cp from "child_process";

(async () => {
if (process.platform !== "linux") {
Expand Down Expand Up @@ -38,6 +39,14 @@ import * as fs from "fs";
var content = fs.readFileSync(status, "utf-8");
console.log(content);
}

if (!fs.existsSync(doneFile)) {
var journalLog = cp.execSync("sudo journalctl -u agent.service", {
encoding: "utf8",
});
console.log("Service log:");
console.log(journalLog);
}
})();

function sleep(ms) {
Expand Down

0 comments on commit dea7bd5

Please sign in to comment.