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