|
@@ -0,0 +1,15 @@
|
|
|
|
|
+# Fail when encoutering an error
|
|
|
|
|
+set -euo pipefail
|
|
|
|
|
+
|
|
|
|
|
+curl -SL https://git.medowar.de/Medowar/chrony-stats/raw/master/chrony-network-stats.sh -o chrony-network-stats.sh
|
|
|
|
|
+chmod +x chrony-network-stats.sh
|
|
|
|
|
+
|
|
|
|
|
+sudo apt update
|
|
|
|
|
+sudo apt install -y nginx vnstat vnstati rrdtool chrony
|
|
|
|
|
+
|
|
|
|
|
+mv chrony-network-stats.sh /usr/local/bin/chrony-network-stats.sh
|
|
|
|
|
+# Add crontab to run every 5 minutes and discard output
|
|
|
|
|
+(crontab -l 2>/dev/null; echo "*/5 * * * * /usr/local/bin/chrony-network-stats.sh >/dev/null 2>&1") | crontab -
|
|
|
|
|
+
|
|
|
|
|
+# Removing default nginx page
|
|
|
|
|
+rm /var/www/html/index.nginx-debian.html
|