-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathupdate_site
More file actions
executable file
·33 lines (24 loc) · 818 Bytes
/
update_site
File metadata and controls
executable file
·33 lines (24 loc) · 818 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
# Workaround for Markdown render target filename flexibility
# and RRDTool Python dump support.
#
# Settings
#
# Used to run analyze script
analyze="python analyze.py"
# Path to upload config.
uploadConfig="upload.config"
#
# Script
#
# Change to directory the script is stored in.
cd $(dirname "$0")
# Update RRD plots and database, peer count, link length, bulk reject percentage, and Markdown render.
$analyze --rrd --peer-count --link-lengths --uptime --bulk-reject --markdown index.md || exit 1
# Move index render to index.html.
mv output/index.md.html output/index.html || exit 2
# Dump RRD database to XML.
# Official Python RRDTool bindings do not expose this.
rrdtool dump size.rrd output/size.xml || exit 3
# Insert site, including RRD dump.
$analyze --upload "$uploadConfig" || exit 4