summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2016-03-24 11:57:10 +0100
committerDaniel Friesel <derf@finalrewind.org>2016-03-24 11:57:10 +0100
commite765e6985fac2986c266d67d575d0d5cc4b6f914 (patch)
tree4f1ca577ae12ff45a28a3d1aef396d3d9c776b3a
parent539b45fd2112ab27148e7e7d5b9f17132c5f6a4c (diff)
add data logger wrapper + service file examples
-rwxr-xr-xexamples/dbdb-logger18
-rw-r--r--examples/dbdb-logger.service12
2 files changed, 30 insertions, 0 deletions
diff --git a/examples/dbdb-logger b/examples/dbdb-logger
new file mode 100755
index 0000000..c0d14f0
--- /dev/null
+++ b/examples/dbdb-logger
@@ -0,0 +1,18 @@
+#!/bin/zsh
+
+export DBDB_PASSWORD=changeme
+
+SLEEPMIN=60
+SLEEPRAND=60
+
+while sleep $(( SLEEPMIN + (RANDOM % SLEEPRAND) )); do
+ /srv/www/dbdb/bin/iris-delay-stats EE
+ sleep $(( SLEEPMIN + (RANDOM % SLEEPRAND) ))
+ /srv/www/dbdb/bin/iris-delay-stats KD
+ sleep $(( SLEEPMIN + (RANDOM % SLEEPRAND) ))
+ /srv/www/dbdb/bin/iris-delay-stats AH
+ sleep $(( SLEEPMIN + (RANDOM % SLEEPRAND) ))
+ /srv/www/dbdb/bin/iris-delay-stats FF
+ sleep $(( SLEEPMIN + (RANDOM % SLEEPRAND) ))
+ /srv/www/dbdb/bin/iris-delay-stats MH
+done
diff --git a/examples/dbdb-logger.service b/examples/dbdb-logger.service
new file mode 100644
index 0000000..b0827bc
--- /dev/null
+++ b/examples/dbdb-logger.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=DBDB / Iris-delay-stats log service
+After=network.target
+
+[Service]
+ExecStart=/srv/www/dbdb/bin/dbdb-logger
+User=www-dbdb
+Restart=on-failure
+RestartSec=60
+
+[Install]
+WantedBy=multi-user.target