mirror of
https://github.com/byReqz/gotty-docker.git
synced 2024-10-31 23:43:13 +00:00
add ability to toggle tmux use
This commit is contained in:
parent
2754f57143
commit
609ef528ef
@ -24,6 +24,7 @@ this is a dynamically built gotty container
|
|||||||
- title - set application title (browser and tmux session title, def. gotty)
|
- title - set application title (browser and tmux session title, def. gotty)
|
||||||
- pkgs - additional packages to install when the container is started (optional, def. none)
|
- pkgs - additional packages to install when the container is started (optional, def. none)
|
||||||
- command - the command to run (required, def. none/pfetch)
|
- command - the command to run (required, def. none/pfetch)
|
||||||
|
- use_tmux - either open a subshell for every page load (false) or just attach to a single shell started at the beginning (true) (optional, def. true)
|
||||||
|
|
||||||
## compose
|
## compose
|
||||||
this example can also be found in the repo
|
this example can also be found in the repo
|
||||||
@ -44,6 +45,7 @@ services:
|
|||||||
- title=1234
|
- title=1234
|
||||||
- pkgs=htop
|
- pkgs=htop
|
||||||
- command=htop
|
- command=htop
|
||||||
|
- use_tmux=true
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,3 +13,4 @@ services:
|
|||||||
- title=1234
|
- title=1234
|
||||||
- pkgs=htop
|
- pkgs=htop
|
||||||
- command=htop
|
- command=htop
|
||||||
|
- use_tmux=true
|
||||||
|
6
run.sh
6
run.sh
@ -19,4 +19,8 @@ if [ -z "$command" ];then
|
|||||||
command="curl -s https://raw.githubusercontent.com/dylanaraps/pfetch/master/pfetch | ash && figlet no command set && read swag"
|
command="curl -s https://raw.githubusercontent.com/dylanaraps/pfetch/master/pfetch | ash && figlet no command set && read swag"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
/gotty -p "$port" $creds --title-format "$title" tmux new-session -A -s "$title" "$command"
|
if [ "$use_tmux" == "false" ];then
|
||||||
|
/gotty -p "$port" $creds --title-format "$title" "$command"
|
||||||
|
else
|
||||||
|
/gotty -p "$port" $creds --title-format "$title" tmux new-session -A -s "$title" "$command"
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user