This commit is contained in:
SkyperTHC 2022-11-27 13:05:22 +00:00
parent de0af2a375
commit c098af01d3
No known key found for this signature in database
GPG Key ID: A9BD386DF9113CD6

@ -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)) "$@"