aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/tickle.lua
diff options
context:
space:
mode:
authoronefang2020-09-08 21:34:54 +1000
committeronefang2020-09-08 21:34:54 +1000
commitbd58d3012c26d16150f650c389d1136741d3939d (patch)
tree3d2aec8bfe0a0c9061ddb4814e71aff33b9b8dc8 /src/tickle.lua
parentAdd the old bash scripts. (diff)
downloadopensim-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-xsrc/tickle.lua26
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
5local 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
14local config = {}
15
16for 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
24end
25
26os.execute("curl -so /dev/null http://" .. config.webHost .. "/" .. config.URL .. "/stats.html")