add default configs and s6-overlay
Some checks failed
/ release-and-build (push) Failing after 14s

This commit is contained in:
2026-02-24 17:10:16 +01:00
parent 05e77cf79c
commit 98e6dc77ee
24 changed files with 194 additions and 61 deletions

34
root/defaults/stats Normal file
View File

@@ -0,0 +1,34 @@
#!/bin/sh
output="/app/www/.stats"
nic="eth0"
generate_index() {
cat <<-EOF
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="cache-control" content=no-cache">
<meta http-equiv="refresh" content="3000">
<title>Alpine Linux mirror statistics</title>
</head>
<body>
<table border="0">
<tr><td><img src="summary.png" alt="summary"></td><td><img src="hours.png" alt="hours"></td></tr>
<tr><td rowspan="2"><img src="days.png" alt="days"></td><td><img src="top10.png" alt="top10"></td></tr>
<tr><td><img src="months.png" alt="months"></td></tr>
</table>
</body>
</html>
EOF
}
if [ ! -f "$output"/index.html ]; then
mkdir -p $output
generate_index > "$output"/index.html
fi
for type in hours days months top10 summary hsummary vsummary; do
vnstati --${type} -i $nic -o $output/${type}.png
done