summaryrefslogtreecommitdiff
path: root/extra/auto-reload-config.runit
blob: cf6e7c2546d3de6d67b1095d413cafb0b5010d2c (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
    sleep infinity
fi

while true; do
    sleep $CONFIG_RELOAD_INTERVAL
    echo "Reloading config..."
    curl -s http://localhost:8888/reload?format=json -O /dev/null
done