Add some deployment and startup scripts
They were here for ages, so let's version-control them.
This commit is contained in:
parent
f24aa8f3f0
commit
09f9a563f0
5
reporter/setup.sh
Normal file
5
reporter/setup.sh
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -exu
|
||||
|
||||
/usr/sbin/useradd -r -m -k /var/empty -c 'Report generator and sender' reporter
|
4
reporter/update.sh
Normal file
4
reporter/update.sh
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
scp conf/basalt.json xalt:reports
|
||||
rsync -yavP --exclude "*.pyc" port_stats xalt:reports/
|
17
stats/daily.sh
Executable file
17
stats/daily.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
cd ~/stats
|
||||
TAG="${1:+-$1}"
|
||||
OUT_DIR="$HOME/reports/$(date '+%Y-%m-%d')$TAG"
|
||||
|
||||
python2 -m port_stats.daily "$OUT_DIR" basalt.json
|
||||
|
||||
if [ -z "$TAG" ]; then
|
||||
rm -f "latest"
|
||||
ln -rs "$OUT_DIR" "$HOME/reports/latest"
|
||||
fi
|
||||
|
||||
xz "$OUT_DIR"/*/*.tsv
|
||||
xz "$OUT_DIR"/*/unmets.txt
|
4
stats/interactive.sh
Executable file
4
stats/interactive.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd ~/stats
|
||||
exec python2 -im port_stats.interactive basalt.json
|
Loading…
x
Reference in New Issue
Block a user