diff options
author | onefang | 2020-09-08 21:34:54 +1000 |
---|---|---|
committer | onefang | 2020-09-08 21:34:54 +1000 |
commit | bd58d3012c26d16150f650c389d1136741d3939d (patch) | |
tree | 3d2aec8bfe0a0c9061ddb4814e71aff33b9b8dc8 /src/tickle.lua | |
parent | Add the old bash scripts. (diff) | |
download | opensim-SC-bd58d3012c26d16150f650c389d1136741d3939d.zip opensim-SC-bd58d3012c26d16150f650c389d1136741d3939d.tar.gz opensim-SC-bd58d3012c26d16150f650c389d1136741d3939d.tar.bz2 opensim-SC-bd58d3012c26d16150f650c389d1136741d3939d.tar.xz |
Add the SledjChisl stuff.
Diffstat (limited to '')
-rwxr-xr-x | src/tickle.lua | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/tickle.lua b/src/tickle.lua new file mode 100755 index 0000000..fc89237 --- /dev/null +++ b/src/tickle.lua | |||
@@ -0,0 +1,26 @@ | |||
1 | #!/usr/bin/env luajit | ||
2 | |||
3 | -- Grab the stats web page, just to ping the database server, coz sledjchisl isn't event driven yet. | ||
4 | |||
5 | local paths = | ||
6 | { | ||
7 | ".sledjChisl.conf.lua", | ||
8 | "/etc/sledjChisl.conf.lua", | ||
9 | -- "/etc/sledjChisl.d/*.lua", | ||
10 | "~/.sledjChisl.conf.lua", | ||
11 | -- "~/.config/sledjChisl/*.lua", | ||
12 | } | ||
13 | |||
14 | local config = {} | ||
15 | |||
16 | for k, v in ipairs(paths) do | ||
17 | local cfg = loadfile(v) | ||
18 | if nil ~= cfg then | ||
19 | cfg = cfg() | ||
20 | for k, w in pairs(cfg) do | ||
21 | config[k] = w | ||
22 | end | ||
23 | end | ||
24 | end | ||
25 | |||
26 | os.execute("curl -so /dev/null http://" .. config.webHost .. "/" .. config.URL .. "/stats.html") | ||