aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/sledjchisl/sledjchisl.c75
1 files changed, 52 insertions, 23 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c
index fb4eb96..633979f 100644
--- a/src/sledjchisl/sledjchisl.c
+++ b/src/sledjchisl/sledjchisl.c
@@ -8457,29 +8457,58 @@ Build the OpenSim.
8457 // After the session is created, we rely on the scRun directory to be group sticky, so that anyone in the opensim group can attach to the tmux socket. 8457 // After the session is created, we rely on the scRun directory to be group sticky, so that anyone in the opensim group can attach to the tmux socket.
8458 pre = xmprintf("sudo -Hu %s ", scUser); 8458 pre = xmprintf("sudo -Hu %s ", scUser);
8459 } 8459 }
8460 snprintf(toybuf, sizeof(toybuf), 8460 if (BUILD == currentMode)
8461 "%s %s %s/%s set-option -g default-command 'export PATH=%s:$PATH; bash'\\; " 8461 snprintf(toybuf, sizeof(toybuf),
8462 // Set x,y to huge values, to work around an OpenSim bug. 8462 "%s %s %s/%s set-option -g default-command 'export PATH=%s:$PATH; bash'\\; "
8463 "new-session -d -x 256 -y 420 -s %s -n '%s' bash -c 'export PATH=%s:$PATH; printf \"\\033]0;SledjChisl\\007\"; " 8463 // Set x,y to huge values, to work around an OpenSim bug.
8464 "/usr/bin/valgrind --leak-check=full %s/current/bin/sledjchisl %s %s; cd %s; bash' \\; " 8464 "new-session -d -x 256 -y 420 -s %s -n '%s' bash -c 'export PATH=%s:$PATH; printf \"\\033]0;SledjChisl\\007\"; "
8465 "split-window -vp 50 -d -t '%s:0.0' \\; " 8465 "/usr/bin/valgrind --leak-check=full %s/current/bin/sledjchisl %s %s; cd %s; bash' \\; "
8466 "split-window -hp 50 -d -t '%s:0.1' \\; " 8466// "split-window -vp 50 -d -t '%s:0.0' \\; "
8467 "split-window -hp 50 -d -t '%s:0.0' " 8467// "split-window -hp 50 -d -t '%s:0.1' \\; "
8468 // TODO - remove this once we handle the fcgi stuff ourselves. 8468// "split-window -hp 50 -d -t '%s:0.0' "
8469 // Make the FCGI socket world read / write, coz we can't set it to group www-data, since -G only works for root, and we ain't root. 8469 // TODO - remove this once we handle the fcgi stuff ourselves.
8470 // TODO - BIG SECURITY HOLE??? 8470 // Make the FCGI socket world read / write, coz we can't set it to group www-data, since -G only works for root, and we ain't root.
8471 "bash -c 'export PATH=%s:$PATH; printf \"\\033]0;FCGI web server\\007\"; sleep 2;" // The sleep is so that both are not creating the .shini files at the same time. 8471 // TODO - BIG SECURITY HOLE???
8472 "spawn-fcgi -n -u %s -s %s/sledjchisl.socket -M 0666 -G www-data -- /usr/bin/valgrind --leak-check=full %s/current/bin/sledjchisl %s; " 8472// "bash -c 'export PATH=%s:$PATH; printf \"\\033]0;FCGI web server\\007\"; sleep 2;" // The sleep is so that both are not creating the .shini files at the same time.
8473 "cd %s; bash'" 8473// "spawn-fcgi -n -u %s -s %s/sledjchisl.socket -M 0666 -G www-data -- /usr/bin/valgrind --leak-check=full %s/current/bin/sledjchisl %s; "
8474 , 8474// "cd %s; bash'"
8475 pre, Tcmd, scRun, Tsocket, scBin, 8475 ,
8476 Tconsole, Ttab, scBin, 8476 pre, Tcmd, scRun, Tsocket, scBin,
8477 scRoot, modeStrings[currentMode], FLAG(v) ? "-v" : "", scRoot, 8477 Tconsole, Ttab, scBin,
8478 Tconsole, 8478 scRoot, modeStrings[currentMode], FLAG(v) ? "-v" : "", scRoot
8479 Tconsole, 8479// Tconsole,
8480 Tconsole, 8480// Tconsole,
8481 scBin, 8481// Tconsole,
8482 scUser, scRun, scRoot, FLAG(v) ? "-v" : "", scRoot); 8482// scBin,
8483// scUser, scRun, scRoot, FLAG(v) ? "-v" : "",
8484// scRoot
8485 );
8486 else
8487 snprintf(toybuf, sizeof(toybuf),
8488 "%s %s %s/%s set-option -g default-command 'export PATH=%s:$PATH; bash'\\; "
8489 // Set x,y to huge values, to work around an OpenSim bug.
8490 "new-session -d -x 256 -y 420 -s %s -n '%s' bash -c 'export PATH=%s:$PATH; printf \"\\033]0;SledjChisl\\007\"; "
8491 "/usr/bin/valgrind --leak-check=full %s/current/bin/sledjchisl %s %s; cd %s; bash' \\; "
8492 "split-window -vp 50 -d -t '%s:0.0' \\; "
8493 "split-window -hp 50 -d -t '%s:0.1' \\; "
8494 "split-window -hp 50 -d -t '%s:0.0' "
8495 // TODO - remove this once we handle the fcgi stuff ourselves.
8496 // Make the FCGI socket world read / write, coz we can't set it to group www-data, since -G only works for root, and we ain't root.
8497 // TODO - BIG SECURITY HOLE???
8498 "bash -c 'export PATH=%s:$PATH; printf \"\\033]0;FCGI web server\\007\"; sleep 2;" // The sleep is so that both are not creating the .shini files at the same time.
8499 "spawn-fcgi -n -u %s -s %s/sledjchisl.socket -M 0666 -G www-data -- /usr/bin/valgrind --leak-check=full %s/current/bin/sledjchisl %s; "
8500 "cd %s; bash'"
8501 ,
8502 pre, Tcmd, scRun, Tsocket, scBin,
8503 Tconsole, Ttab, scBin,
8504 scRoot, modeStrings[currentMode], FLAG(v) ? "-v" : "", scRoot,
8505 Tconsole,
8506 Tconsole,
8507 Tconsole,
8508 scBin,
8509 scUser, scRun, scRoot, FLAG(v) ? "-v" : "",
8510 scRoot
8511 );
8483 free(pre); 8512 free(pre);
8484 if (shellMeFail(toybuf)) 8513 if (shellMeFail(toybuf))
8485 E("tmux new-session command failed! %s", toybuf); 8514 E("tmux new-session command failed! %s", toybuf);