summaryrefslogtreecommitdiffstats
path: root/retiolum/scripts
diff options
context:
space:
mode:
authoreuer <root@euer.krebsco.de>2012-11-29 17:36:05 +0100
committereuer <root@euer.krebsco.de>2012-11-29 17:36:05 +0100
commit9df3e874598a68873df94ffa344e3c172824736a (patch)
treece091bc1eebf6f684f865405a815ff9c48878693 /retiolum/scripts
parent176cba685830af99bf2d4d8278ef01686c894dca (diff)
add github_listener
a listener which fires create-host-tar every time being hit by github webhook
Diffstat (limited to 'retiolum/scripts')
-rw-r--r--retiolum/scripts/github_listener/github_listener.conf3
-rwxr-xr-xretiolum/scripts/github_listener/listen6
2 files changed, 9 insertions, 0 deletions
diff --git a/retiolum/scripts/github_listener/github_listener.conf b/retiolum/scripts/github_listener/github_listener.conf
new file mode 100644
index 00000000..d1f2dae4
--- /dev/null
+++ b/retiolum/scripts/github_listener/github_listener.conf
@@ -0,0 +1,3 @@
+[program:github_listener]
+command=/krebs/retiolum/scripts/github_listener/listen 5432
+user=nobody
diff --git a/retiolum/scripts/github_listener/listen b/retiolum/scripts/github_listener/listen
new file mode 100755
index 00000000..c701d14b
--- /dev/null
+++ b/retiolum/scripts/github_listener/listen
@@ -0,0 +1,6 @@
+#!/bin/sh
+PORT=${1:-5432}
+# eloop pattern
+while sleep 1; do
+ nc -l -p $PORT -e /krebs/retiolum/bin/create-host-tar && logger "successfully built retiolum hosts tarball"
+done