From e3a3bec768ee075466256a41ef85e115e1e8dc1e Mon Sep 17 00:00:00 2001 From: Johannes Findeisen Date: Fri, 18 Jan 2019 21:50:34 +0100 Subject: [PATCH] some fixes and new README.md --- .gitignore | 1 - bin/README.md | 4 ++++ bin/stats.sh | 7 ++++--- 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 bin/README.md diff --git a/.gitignore b/.gitignore index 42082e46..62725a34 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,6 @@ !bin/stats.sh !.config - !.config/awesome !.config/awesome/** .config/awesome/private.lua diff --git a/bin/README.md b/bin/README.md new file mode 100644 index 00000000..a13920d5 --- /dev/null +++ b/bin/README.md @@ -0,0 +1,4 @@ +Some of my Shell scripts I share with other systems. + +Some of them need a ~/.config.sh file for working properly. + diff --git a/bin/stats.sh b/bin/stats.sh index 7dd1e662..3625066b 100755 --- a/bin/stats.sh +++ b/bin/stats.sh @@ -2,6 +2,7 @@ output="/var/www/localhost/htdocs/stats/" nic="eth0" +name=$(hostname) generate_index() { cat <<-EOF @@ -12,7 +13,7 @@ generate_index() { - e: eth0 network statistics + $name: $nic network statistics
@@ -27,10 +28,10 @@ generate_index() { EOF } -if [ ! -f "$output"/index.html ]; then +#if [ ! -f "$output"/index.html ]; then mkdir -p $output generate_index > "$output"/index.html -fi +#fi for type in hours days months top10 summary hsummary vsummary; do vnstati --${type} -i $nic -o $output/${type}.png