diff options
author | ytti <saku@ytti.fi> | 2016-01-19 18:17:20 +0200 |
---|---|---|
committer | ytti <saku@ytti.fi> | 2016-01-19 18:17:20 +0200 |
commit | 93593578aabba6cbbc11b331ead3c4271b3569f6 (patch) | |
tree | 502d08204bc1c16896413d9d3d1746f3ce724723 /extra | |
parent | 7948a07b5b5916809ab02d18cd120b3afaf48bfd (diff) | |
parent | eb3d86fe6debc286d74e0eed5a61d5a564b324c4 (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-x | extra/auto-reload-config.runit | 12 | ||||
-rwxr-xr-x | extra/oxidized.runit | 2 |
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 |