diff --git a/root/defaults/stats b/root/defaults/stats index 19296f4..e7788e6 100755 --- a/root/defaults/stats +++ b/root/defaults/stats @@ -4,31 +4,31 @@ output="/app/www/.stats" nic="eth0" generate_index() { - cat <<-EOF - - - - - - - Alpine Linux mirror statistics - - - - - - -
summaryhours
days
months
- - - EOF +cat < + + + + + + Alpine Linux mirror statistics + + + + + + +
summaryhours
days
months
+ + +EOF } -if [ ! -f "$output"/index.html ]; then - mkdir -p $output - generate_index > "$output"/index.html +if [ ! -f "$output/index.html" ]; then + mkdir -p "$output" + generate_index > "$output/index.html" fi for type in hours days months summary hsummary vsummary; do - vnstati --${type} -i $nic -o $output/${type}.png + vnstati --${type} -i "$nic" -o "$output/${type}.png" done \ No newline at end of file