Fix uptime command for BusyBox

This commit is contained in:
Neo
2026-02-19 11:48:18 +00:00
parent 457ad7234b
commit 429e803ea6

View File

@@ -100,7 +100,7 @@ export async function GET(request: Request) {
const load = execSync('uptime | awk -F\'load average:\' \'{print $2}\'', { cwd: '/' }).toString().trim(); const load = execSync('uptime | awk -F\'load average:\' \'{print $2}\'', { cwd: '/' }).toString().trim();
// Get uptime // Get uptime
const uptime = execSync('uptime -p', { cwd: '/' }).toString().trim(); const uptime = execSync('uptime', { cwd: '/' }).toString().trim();
return NextResponse.json({ return NextResponse.json({
containers: `${containers} running`, containers: `${containers} running`,