aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authoronefang2020-04-12 02:12:02 +1000
committeronefang2020-04-12 02:12:02 +1000
commit637ea1ad6fe668fc70c31de98fad03c9daca4b13 (patch)
treeb06b30579b3500031bba099fc3d66d3839cd5f97 /src
parentAdd the web host name to the config file. (diff)
downloadopensim-SC_OLD-637ea1ad6fe668fc70c31de98fad03c9daca4b13.zip
opensim-SC_OLD-637ea1ad6fe668fc70c31de98fad03c9daca4b13.tar.gz
opensim-SC_OLD-637ea1ad6fe668fc70c31de98fad03c9daca4b13.tar.bz2
opensim-SC_OLD-637ea1ad6fe668fc70c31de98fad03c9daca4b13.tar.xz
A small script to tickle the database.
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")