summaryrefslogtreecommitdiff
path: root/extra/auto-reload-config.runit
blob: 5eaecc820e864e387eab1f5f2df747bb44d71644 (plain)
1
2
3
4
5
6
7
8
9
10
11
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