aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/tickle.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/tickle.lua')
-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")