riot: bug fix when 'tmp' has leading zeros

This commit is contained in:
xiongdian.me 2023-04-19 14:37:28 +08:00
parent e5f88b99d9
commit f484e4c7e1

View File

@ -32,7 +32,7 @@ get_server_meta()
SERVER=proxy.beardic.cn SERVER=proxy.beardic.cn
local tmp=$(sha256sum <<< "$host" | tr -cd "[:digit:]") local tmp=$(sha256sum <<< "$host" | tr -cd "[:digit:]")
tmp=${tmp:0:4} tmp=${tmp:0:4}
PORT=$((tmp+36000)) PORT=$((10#$tmp+36000))
SSH_USERNAME=root SSH_USERNAME=root
;; ;;
* ) * )