summaryrefslogtreecommitdiff
path: root/extra/auto-reload-config.runit
diff options
context:
space:
mode:
Diffstat (limited to 'extra/auto-reload-config.runit')
-rwxr-xr-xextra/auto-reload-config.runit12
1 files changed, 12 insertions, 0 deletions
diff --git a/extra/auto-reload-config.runit b/extra/auto-reload-config.runit
new file mode 100755
index 0000000..5eaecc8
--- /dev/null
+++ b/extra/auto-reload-config.runit
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+if [ -z "$CONFIG_RELOAD_INTERVAL" ]; then
+ # Just stop and do nothing
+ read
+fi
+
+while true; do
+ sleep $CONFIG_RELOAD_INTERVAL
+ echo "Reloading config..."
+ curl -s http://localhost:8888/reload?format=json -O /dev/null
+done