diff --git a/services/dhcpcd.ts b/services/dhcpcd.ts index 4ee02ec..fc6ecca 100644 --- a/services/dhcpcd.ts +++ b/services/dhcpcd.ts @@ -1,5 +1,6 @@ import { Alpine } from "../alpine.js"; import { Runit } from "../runit/index.js"; +import { FluentBitParser, runitLokiLogger } from "../software/fluentbit.js"; export async function setupDhcpcd(alpine: Alpine, runit: Runit) { await alpine.addPackages(["dhcpcd"]); @@ -10,7 +11,8 @@ export async function setupDhcpcd(alpine: Alpine, runit: Runit) { await runit.addService( "dhcpcd", `#!/bin/sh -exec dhcpcd --nobackground -` +exec dhcpcd --nobackground 2>&1 +`, + runitLokiLogger(FluentBitParser.Dhcpcd, "dhcpcd") ); } diff --git a/software/fluentbit.ts b/software/fluentbit.ts index 1adf923..fb48cb9 100644 --- a/software/fluentbit.ts +++ b/software/fluentbit.ts @@ -36,6 +36,7 @@ export enum FluentBitParser { Forgejo = "forgejo", Ntpsec = "ntpsec", + Dhcpcd = "dhcpcd", } async function saveParsers(alpine: Alpine): Promise { @@ -62,6 +63,11 @@ async function saveParsers(alpine: Alpine): Promise { name ntpsec format regex regex ^(?