mirror of
https://github.com/hackerschoice/segfault.git
synced 2024-06-28 17:51:22 +00:00
mosh
This commit is contained in:
parent
de0af2a375
commit
c098af01d3
17
guest/fs-root/usr/bin/mosh-server.sh
Executable file
17
guest/fs-root/usr/bin/mosh-server.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Will be renamed to mosh-server
|
||||
|
||||
[[ $1 != "new" ]] && exec -a mosh-server /usr/bin/mosh-server.orig "$@"
|
||||
|
||||
shift 1
|
||||
|
||||
ip=$(ip addr show eth0)
|
||||
ip=${ip##*inet }
|
||||
ip=${ip%%/*}
|
||||
y=${ip##*.}
|
||||
x=${ip%.*}
|
||||
x=${x##*.}
|
||||
|
||||
exec -a mosh-server /usr/bin/mosh-server.orig new -p $((25000 + x*256 + y)) "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user