mirror of
https://github.com/byReqz/gotty-docker.git
synced 2024-12-25 19:21:48 +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)
|
||||
- pkgs - additional packages to install when the container is started (optional, def. none)
|
||||
- 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
|
||||
this example can also be found in the repo
|
||||
@ -44,6 +45,7 @@ services:
|
||||
- title=1234
|
||||
- pkgs=htop
|
||||
- command=htop
|
||||
- use_tmux=true
|
||||
```
|
||||
|
||||
|
||||
|
@ -13,3 +13,4 @@ services:
|
||||
- title=1234
|
||||
- pkgs=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"
|
||||
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