aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authoronefang2020-03-17 20:55:21 +1000
committeronefang2020-03-17 20:55:21 +1000
commit8046c5b81a1cf9025c9ba908429093086aa65498 (patch)
treef8402629041f2b7bc31532f1bddb257ad8e57575 /src
parentRemove cruft now that we are back to using full toybox again. (diff)
downloadopensim-SC_OLD-8046c5b81a1cf9025c9ba908429093086aa65498.zip
opensim-SC_OLD-8046c5b81a1cf9025c9ba908429093086aa65498.tar.gz
opensim-SC_OLD-8046c5b81a1cf9025c9ba908429093086aa65498.tar.bz2
opensim-SC_OLD-8046c5b81a1cf9025c9ba908429093086aa65498.tar.xz
Move the tmux check until after we have loaded the config and paths.
Diffstat (limited to 'src')
-rw-r--r--src/sledjchisl/sledjchisl.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c
index 17a1ae8..800a224 100644
--- a/src/sledjchisl/sledjchisl.c
+++ b/src/sledjchisl/sledjchisl.c
@@ -4345,25 +4345,6 @@ void sledjchisl_main(void)
4345 if (!S_ISCHR(statbuf.st_mode)) 4345 if (!S_ISCHR(statbuf.st_mode))
4346 isWeb = TRUE; 4346 isWeb = TRUE;
4347 } 4347 }
4348 if (!isWeb)
4349 {
4350 I("Outputting to a terminal, not a web server.");
4351 // Check if we are already running inside the proper tmux server.
4352 char *eTMUX = getenv("TMUX");
4353 memset(toybuf, 0, sizeof(toybuf));
4354 snprintf(toybuf, sizeof(toybuf), "%s/%s", scRoot, Tsocket);
4355 if (((eTMUX) && (0 == strncmp(toybuf, eTMUX, strlen(toybuf)))))
4356 {
4357 I("Running inside the proper tmux server.");
4358 isTmux = TRUE;
4359 }
4360 else
4361 I("Not running inside the proper tmux server, starting it.");
4362 I("libfcgi version: %s", FCGI_VERSION);
4363 I("Lua version: %s", LUA_RELEASE);
4364 I("LuaJIT version: %s", LUAJIT_VERSION);
4365 I("MariaDB / MySQL client version: %s", mysql_get_client_info());
4366 }
4367 4348
4368 // Print our user name and groups. 4349 // Print our user name and groups.
4369 struct passwd *pw; 4350 struct passwd *pw;
@@ -4518,6 +4499,22 @@ jit library is loaded or the JIT compiler will not be activated.
4518 scLog = xmprintf("%s%s/var/log", slsh, scRoot); 4499 scLog = xmprintf("%s%s/var/log", slsh, scRoot);
4519 } 4500 }
4520 4501
4502 if (!isWeb)
4503 {
4504 I("Outputting to a terminal, not a web server.");
4505 // Check if we are already running inside the proper tmux server.
4506 char *eTMUX = getenv("TMUX");
4507 memset(toybuf, 0, sizeof(toybuf));
4508 snprintf(toybuf, sizeof(toybuf), "%s/%s", scRun, Tsocket);
4509 if (((eTMUX) && (0 == strncmp(toybuf, eTMUX, strlen(toybuf)))))
4510 {
4511 I("Running inside the proper tmux server. %s", eTMUX);
4512 isTmux = TRUE;
4513 }
4514 else
4515 I("Not running inside the proper tmux server, starting it. %s == %s", eTMUX, toybuf);
4516 }
4517
4521 if (isTmux || isWeb) 4518 if (isTmux || isWeb)
4522 { 4519 {
4523 char *d; 4520 char *d;