screen : remplacement par tmux
This commit is contained in:
parent
4ada112d9d
commit
b22025d6bc
2 changed files with 11 additions and 6 deletions
|
@ -33,8 +33,8 @@ the same virtual machines
|
||||||
- **Modularization**: `qemush` launching scripts are intended to be
|
- **Modularization**: `qemush` launching scripts are intended to be
|
||||||
stackable to reuse common `qemu` parameters in all virtual machines
|
stackable to reuse common `qemu` parameters in all virtual machines
|
||||||
needing them
|
needing them
|
||||||
- **Process supervision**: `qemush` uses `screen` to supervise processes
|
- **Process supervision**: `qemush` uses `tmux` to supervise processes and
|
||||||
and keep track of them
|
keep track of them
|
||||||
- **Copy-on-write**: images are formatted using `qcow2` to use less space
|
- **Copy-on-write**: images are formatted using `qcow2` to use less space
|
||||||
on disk
|
on disk
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ need it
|
||||||
- `bash` - the `qemush` interpreter
|
- `bash` - the `qemush` interpreter
|
||||||
- `coreutils` - used for basic OS operations
|
- `coreutils` - used for basic OS operations
|
||||||
- `sudo` - execute commands as `qemu`
|
- `sudo` - execute commands as `qemu`
|
||||||
- `screen` - for process supervision
|
- `tmux` - for process supervision
|
||||||
- `source-highlight` - for syntax highlighting when displaying launching
|
- `source-highlight` - for syntax highlighting when displaying launching
|
||||||
scripts
|
scripts
|
||||||
- `pathof` - see [Installation instructions](#installation-instructions)
|
- `pathof` - see [Installation instructions](#installation-instructions)
|
||||||
|
|
11
bin/qemush
11
bin/qemush
|
@ -63,15 +63,20 @@ public_start() {
|
||||||
QEMUSH_NAME="$1"
|
QEMUSH_NAME="$1"
|
||||||
shift
|
shift
|
||||||
|
|
||||||
exec screen -S "$vm_name" "$vm_name" "$@"
|
exec tmux new-session \
|
||||||
|
-s "$QEMUSH_NAME" \
|
||||||
|
"$QEMUSH_NAME" \
|
||||||
|
"$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
public_watch() {
|
public_watch() {
|
||||||
exec screen -dr "$1"
|
[ -n "$1" ] && set -- -t "$1"
|
||||||
|
|
||||||
|
exec tmux attach "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
public_active() {
|
public_active() {
|
||||||
exec screen -ls
|
exec tmux list-sessions
|
||||||
}
|
}
|
||||||
|
|
||||||
public_ls() {
|
public_ls() {
|
||||||
|
|
Loading…
Reference in a new issue