diff options
author | onefang | 2021-08-27 03:46:06 +1000 |
---|---|---|
committer | onefang | 2021-08-27 03:46:06 +1000 |
commit | 2ed54a3817608bcf372b091efc9cb76a65150d33 (patch) | |
tree | 9d2ea2ea554c5b79a250a9aafe077d275b7048a5 | |
parent | Log directory and it's contents only readable / writable for the opensim user. (diff) | |
download | opensim-SC-2ed54a3817608bcf372b091efc9cb76a65150d33.zip opensim-SC-2ed54a3817608bcf372b091efc9cb76a65150d33.tar.gz opensim-SC-2ed54a3817608bcf372b091efc9cb76a65150d33.tar.bz2 opensim-SC-2ed54a3817608bcf372b091efc9cb76a65150d33.tar.xz |
Configure the base port number for sim autogenerated ports.
-rw-r--r-- | src/.sledjChisl.conf.lua | 1 | ||||
-rw-r--r-- | src/sledjchisl/sledjchisl.c | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/.sledjChisl.conf.lua b/src/.sledjChisl.conf.lua index cede4e4..e44886b 100644 --- a/src/.sledjChisl.conf.lua +++ b/src/.sledjChisl.conf.lua | |||
@@ -16,6 +16,7 @@ config = | |||
16 | ["Tconsole"] = "SledjChisl"; | 16 | ["Tconsole"] = "SledjChisl"; |
17 | ["Tsocket"] = "opensim-tmux.socket"; | 17 | ["Tsocket"] = "opensim-tmux.socket"; |
18 | ["Ttab"] = "SC"; | 18 | ["Ttab"] = "SC"; |
19 | ["startPort"] = 8002; | ||
19 | ["loadAverageInc"] = 0.7; | 20 | ["loadAverageInc"] = 0.7; |
20 | ["simTimeOut"] = 45; -- seconds | 21 | ["simTimeOut"] = 45; -- seconds |
21 | ["bulkSims"] = 0; -- 0 means figure it out from number of CPUs. | 22 | ["bulkSims"] = 0; -- 0 means figure it out from number of CPUs. |
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index 6298760..fc0857a 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c | |||
@@ -521,6 +521,7 @@ char *Tconsole = "SledjChisl"; | |||
521 | char *Tsocket = "opensim-tmux.socket"; | 521 | char *Tsocket = "opensim-tmux.socket"; |
522 | char *Ttab = "SC"; | 522 | char *Ttab = "SC"; |
523 | char *Tcmd = "tmux -S"; | 523 | char *Tcmd = "tmux -S"; |
524 | int startPort = 8002; | ||
524 | char *backupIARsim = "Sandbox"; | 525 | char *backupIARsim = "Sandbox"; |
525 | char *rSync = ""; | 526 | char *rSync = ""; |
526 | int rSyncPort = 0; | 527 | int rSyncPort = 0; |
@@ -1847,8 +1848,8 @@ void prepSims(simData *simd, char *sim, char *type, int count, int window, int p | |||
1847 | shellMe("echo '}\nreturn IDs' >>%s/IDs_%d.lua", scTemp, window); | 1848 | shellMe("echo '}\nreturn IDs' >>%s/IDs_%d.lua", scTemp, window); |
1848 | 1849 | ||
1849 | findWindow(simd, sim, type, count, window, panes, pane); | 1850 | findWindow(simd, sim, type, count, window, panes, pane); |
1850 | simd->portH = 8004 + count * 2; | 1851 | simd->portH = startPort + 2 + count * 2; |
1851 | simd->portU = 8005 + count * 2; | 1852 | simd->portU = startPort + 3 + count * 2; |
1852 | cmd = xmprintf("rm -fr %s/sim%d; mkdir -p %s/sim%d; sed -E" | 1853 | cmd = xmprintf("rm -fr %s/sim%d; mkdir -p %s/sim%d; sed -E" |
1853 | " -e 's@\\[Region\\]@" | 1854 | " -e 's@\\[Region\\]@" |
1854 | " paneID = \"\\%s\"\\n" | 1855 | " paneID = \"\\%s\"\\n" |
@@ -8109,6 +8110,7 @@ Other possibilities - | |||
8109 | if ((tmp = configs->getstr(configs, "Tconsole", false)) != NULL) {Tconsole = tmp; V("Setting Tconsole = %s", Tconsole);} | 8110 | if ((tmp = configs->getstr(configs, "Tconsole", false)) != NULL) {Tconsole = tmp; V("Setting Tconsole = %s", Tconsole);} |
8110 | if ((tmp = configs->getstr(configs, "Tsocket", false)) != NULL) {Tsocket = tmp; V("Setting Tsocket = %s", Tsocket);} | 8111 | if ((tmp = configs->getstr(configs, "Tsocket", false)) != NULL) {Tsocket = tmp; V("Setting Tsocket = %s", Tsocket);} |
8111 | if ((tmp = configs->getstr(configs, "Ttab", false)) != NULL) {Ttab = tmp; V("Setting Ttab = %s", Ttab);} | 8112 | if ((tmp = configs->getstr(configs, "Ttab", false)) != NULL) {Ttab = tmp; V("Setting Ttab = %s", Ttab);} |
8113 | if ((vd = configs->get (configs, "startPort", NULL, false)) != NULL) {startPort = (int) *((float *) vd); V("Setting startPort = %d", startPort);} | ||
8112 | if ((tmp = configs->getstr(configs, "backupIARsim", false)) != NULL) {backupIARsim = tmp; V("Setting backupIARsim = %s", backupIARsim);} | 8114 | if ((tmp = configs->getstr(configs, "backupIARsim", false)) != NULL) {backupIARsim = tmp; V("Setting backupIARsim = %s", backupIARsim);} |
8113 | if ((tmp = configs->getstr(configs, "rsync", false)) != NULL) {rSync = tmp; V("Setting rsync = %s", rSync);} | 8115 | if ((tmp = configs->getstr(configs, "rsync", false)) != NULL) {rSync = tmp; V("Setting rsync = %s", rSync);} |
8114 | if ((vd = configs->getstr(configs, "rsyncPort", false)) != NULL) {rSyncPort = (int) *((float *) vd); V("Setting rsyncPort = %s", rSyncPort);} | 8116 | if ((vd = configs->getstr(configs, "rsyncPort", false)) != NULL) {rSyncPort = (int) *((float *) vd); V("Setting rsyncPort = %s", rSyncPort);} |