summaryrefslogtreecommitdiffstats
path: root/retiolum
diff options
context:
space:
mode:
Diffstat (limited to 'retiolum')
-rwxr-xr-xretiolum/bin/create-host-tar8
-rw-r--r--retiolum/scripts/github_listener/github_listener.conf3
-rwxr-xr-xretiolum/scripts/github_listener/listen6
3 files changed, 17 insertions, 0 deletions
diff --git a/retiolum/bin/create-host-tar b/retiolum/bin/create-host-tar
new file mode 100755
index 00000000..344109d1
--- /dev/null
+++ b/retiolum/bin/create-host-tar
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -xeuf
+WEBDIR=${WEBDIR:-/srv/http/pub/retiolum}
+HOSTFILE=$WEBDIR/hosts.tar
+cd $(dirname $(readlink -f $0))
+#rm $HOSTFILE
+tar cf $HOSTFILE -C ../hosts .
+chmod a+rx $HOSTFILE
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