summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorytti <saku@ytti.fi>2016-01-19 18:17:20 +0200
committerytti <saku@ytti.fi>2016-01-19 18:17:20 +0200
commit93593578aabba6cbbc11b331ead3c4271b3569f6 (patch)
tree502d08204bc1c16896413d9d3d1746f3ce724723 /extra
parent7948a07b5b5916809ab02d18cd120b3afaf48bfd (diff)
parenteb3d86fe6debc286d74e0eed5a61d5a564b324c4 (diff)
Merge pull request #273 from ocadotechnology/wip-auto-reload-config
Add the option of automatically reloading the config
Diffstat (limited to 'extra')
-rwxr-xr-xextra/auto-reload-config.runit12
-rwxr-xr-xextra/oxidized.runit2
2 files changed, 14 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
diff --git a/extra/oxidized.runit b/extra/oxidized.runit
new file mode 100755
index 0000000..c4ce129
--- /dev/null
+++ b/extra/oxidized.runit
@@ -0,0 +1,2 @@
+#!/bin/bash
+exec setuser root oxidized