Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ This repository contains scripts for:
|`check-changes.sh`
|Git status checker for CI/CD pipelines

|`reboot-tracker.ts`
|`reboot-tracker.mjs`
|Deno script to track system reboot reasons with journalctl/dmesg capture
|===

Expand Down
4 changes: 2 additions & 2 deletions reboot-tracker.ts → reboot-tracker.mjs
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// scripts/reboot-tracker.ts
// scripts/reboot-tracker.mjs
import { join } from "https://deno.land/std@0.224.0/path/mod.ts";
import { parseArgs } from "https://deno.land/std@0.224.0/cli/parse_args.ts";

Expand All @@ -17,7 +17,7 @@ const BASE_DIR = "monitoring/reboot-tracker/logs";
const LOG_FILE = join(BASE_DIR, "reboot-reasons.json");
const SNAPSHOT_DIR = join(BASE_DIR, "snapshots");

async function captureLogs(timestamp: string): Promise<string | null> {
async function captureLogs(timestamp) {
const filename = `snapshot-${timestamp.replace(/[:.]/g, "-")}.log`;
const filepath = join(SNAPSHOT_DIR, filename);

Expand Down
2 changes: 1 addition & 1 deletion reboot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# alias shutdown='bash /var$REPOS_DIR/scripts/reboot.sh --shutdown'

DENO_BIN="/home/hyper/.deno/bin/deno"
TRACKER_TS="/var$REPOS_DIR/scripts/reboot-tracker.ts"
TRACKER_TS="/var$REPOS_DIR/scripts/reboot-tracker.mjs"

# Parse args
IS_SHUTDOWN=false
Expand Down
Loading