diff options
Diffstat (limited to 'src/sledjchisl/sledjchisl.c')
-rw-r--r-- | src/sledjchisl/sledjchisl.c | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index e779c0c..cf241ba 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c | |||
@@ -5,13 +5,13 @@ | |||
5 | * | 5 | * |
6 | * Not using the usual taybox args system, coz it's not working as advertised. | 6 | * Not using the usual taybox args system, coz it's not working as advertised. |
7 | 7 | ||
8 | USE_SLEDJCHISL(NEWTOY(sledjchisl, "", TOYFLAG_USR|TOYFLAG_BIN)) | 8 | USE_SLEDJCHISL(NEWTOY(sledjchisl, "qa", TOYFLAG_USR|TOYFLAG_BIN)) |
9 | 9 | ||
10 | config SLEDJCHISL | 10 | config SLEDJCHISL |
11 | bool "sledjchisl" | 11 | bool "sledjchisl" |
12 | default y | 12 | default y |
13 | help | 13 | help |
14 | usage: sledjchisl [mode [arguments]] | 14 | usage: sledjchisl [-q] [-a] [mode [arguments]] |
15 | 15 | ||
16 | opensim-SC management system. | 16 | opensim-SC management system. |
17 | 17 | ||
@@ -19,31 +19,37 @@ config SLEDJCHISL | |||
19 | create "Sim Name" x,y size | 19 | create "Sim Name" x,y size |
20 | will create a sim. | 20 | will create a sim. |
21 | start | 21 | start |
22 | start -q | ||
22 | start sim01 | 23 | start sim01 |
23 | start "Welcome sim" | 24 | start "Welcome sim" |
24 | will start a sim or everything. | 25 | Will start a sim or everything. |
26 | -q when starting everything wont show the tmux console. | ||
25 | backup | 27 | backup |
26 | backup "Joan Smith" | 28 | backup "Joan Smith" |
27 | backup sim01 | 29 | backup sim01 |
28 | backup "Welcome sim" | 30 | backup "Welcome sim" |
29 | will backup sim or everything. | 31 | Will backup sim or everything. |
30 | gitar i "Joan Smith" | 32 | gitar i "Joan Smith" |
31 | gitar o sim01 | 33 | gitar o sim01 |
32 | gitar o "Welcome sim" | 34 | gitar o "Welcome sim" |
33 | restart | 35 | restart |
34 | restart sim01 | 36 | restart sim01 |
35 | restart "Welcome sim" | 37 | restart "Welcome sim" |
36 | will stop then start a sim, or everything. | 38 | Will stop then start a sim, or everything. |
37 | status | 39 | status |
38 | status sim01 | 40 | status sim01 |
39 | status "Welcome sim" | 41 | status "Welcome sim" |
40 | will show status of a sim, or everything. | 42 | Will show status of a sim, or everything. |
41 | stop | 43 | stop |
44 | stop -a | ||
42 | stop sim01 | 45 | stop sim01 |
43 | stop "Welcome sim" | 46 | stop "Welcome sim" |
44 | will stop a sim, or everything. | 47 | Will stop a sim, or everything. |
48 | -a when stopping everything will close down all tmux windows and panes. | ||
45 | */ | 49 | */ |
46 | 50 | ||
51 | |||
52 | |||
47 | /* | 53 | /* |
48 | configs/sim01 - | 54 | configs/sim01 - |
49 | backup-sim | 55 | backup-sim |
@@ -7204,12 +7210,19 @@ jit library is loaded or the JIT compiler will not be activated. | |||
7204 | if (!WIFEXITED(i)) | 7210 | if (!WIFEXITED(i)) |
7205 | E("tmux select-pane command failed!"); | 7211 | E("tmux select-pane command failed!"); |
7206 | } | 7212 | } |
7207 | // Join the session. | 7213 | // toybox argument parsing is half working. |
7208 | memset(toybuf, 0, sizeof(toybuf)); | 7214 | if ((NULL == toys.optargs[0]) || (('-' != toys.optargs[0][0]) && ('q' != toys.optargs[0][1]))) |
7209 | snprintf(toybuf, sizeof(toybuf), "%s %s/%s select-window -t '%s' \\; attach-session -t '%s'", Tcmd, scRun, Tsocket, Tconsole, Tconsole); | 7215 | { |
7210 | i = system(toybuf); | 7216 | T("Joining the session."); |
7211 | if (!WIFEXITED(i)) | 7217 | // Join the session. |
7212 | E("tmux attach-session command failed! %s", toybuf); | 7218 | memset(toybuf, 0, sizeof(toybuf)); |
7219 | snprintf(toybuf, sizeof(toybuf), "%s %s/%s select-window -t '%s' \\; attach-session -t '%s'", Tcmd, scRun, Tsocket, Tconsole, Tconsole); | ||
7220 | i = system(toybuf); | ||
7221 | if (!WIFEXITED(i)) | ||
7222 | E("tmux attach-session command failed! %s", toybuf); | ||
7223 | } | ||
7224 | else | ||
7225 | T("NOT joining the session."); | ||
7213 | goto finished; | 7226 | goto finished; |
7214 | } | 7227 | } |
7215 | } | 7228 | } |