diff --git a/rootfs/src/entry.sh b/rootfs/src/entry.sh index 91ed6be3..fbdbfd66 100644 --- a/rootfs/src/entry.sh +++ b/rootfs/src/entry.sh @@ -1,5 +1,12 @@ #!/bin/bash +test -z "$VNC_OFFSET" && export VNC_OFFSET=10 +# if PORT_XXX not set, quick set mode +if [ $VNC_OFFSET -gt 10 ] && [ "$VNC_OFFSET" -lt 66 ]; then + test -z "$PORT_SSH" && export PORT_SSH=$(($PORT_SSH*1000+22)) + test -z "$PORT_RDP" && export PORT_RDP=$(($PORT_SSH*1000+89)) + test -z "$PORT_VNC" && export PORT_VNC=$(($PORT_SSH*1000+81)) +fi test -z "$PORT_SSH" && export PORT_SSH=10022 test -z "$PORT_RDP" && export PORT_RDP=10089 test -z "$PORT_VNC" && export PORT_VNC=10081 @@ -7,7 +14,6 @@ test -z "$PORT_VNC" && export PORT_VNC=10081 test -z "$SSH_PASS" && export SSH_PASS=headless test -z "$VNC_PASS" && export VNC_PASS=headless test -z "$VNC_PASS_RO" && export VNC_PASS_RO=View123 -test -z "$VNC_OFFSET" && export VNC_OFFSET=10 # TODO: check port: ssh, rdp, vnc # sudo: unable to resolve host x11-ubuntu: Name or service not known