diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 1be52f7ef9..c2e229892e 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6526,10 +6526,10 @@ _EOF_ then case $G_HW_ARCH in 1) local arch='arm';; + 2) local arch='arm_hf';; 3) local arch='arm64';; 10) local arch='amd64';; - 11) local arch='riscv64';; - *) local arch='arm_hf';; + *) local arch='riscv64';; esac # Download @@ -6580,6 +6580,7 @@ _EOF_ # Pre-create config file to turn on dashboard token=$(openssl rand -hex 15) [[ -f '/etc/frp/frps.toml' ]] || cat << _EOF_ > /etc/frp/frps.toml +bindAddr = "0.0.0.0" bindPort = 7000 webServer.addr = "0.0.0.0" @@ -6616,33 +6617,18 @@ RestartSec=5s [Install] WantedBy=multi-user.target _EOF_ - local server_addr=127.0.0.1 server_port=7000 + local server_addr='127.0.0.1' server_port=7000 if [[ $G_WHIP_RETURNED_VALUE == 'Client' ]] then - local invalid_entry= - while : - do - if G_WHIP_INPUTBOX "${invalid_entry}Please enter the IP address of your frp server, including port (default 7000)" && [[ $G_WHIP_RETURNED_VALUE =~ ^[0-9.:]+$ ]] - then - server_addr=${G_WHIP_RETURNED_VALUE#*:} - [[ $G_WHIP_RETURNED_VALUE =~ : ]] && server_port=${G_WHIP_RETURNED_VALUE%:*} - invalid_entry= - break - else - invalid_entry='[FAILED] Please enter a valid IP address\n\n' - fi - done - - while : - do - if G_WHIP_INPUTBOX "${invalid_entry}Please enter the authentication token of your frp server" && [[ $G_WHIP_RETURNED_VALUE =~ ^[0-9.]+$ ]] - then - token=$G_WHIP_RETURNED_VALUE - break - else - invalid_entry='[FAILED] Please enter a token\n\n' - fi - done + G_WHIP_DEFAULT_ITEM="$server_addr:$server_port" + G_WHIP_INPUTBOX_REGEX='^[0-9.:]+$' + G_WHIP_INPUTBOX_REGEX_TEXT='be a valid IP address, optionally with appended network port number, like "192.168.1.100:7000"' + G_WHIP_INPUTBOX 'Please enter the IP address of your frp server, optionally including port (default 7000):' + server_addr=${G_WHIP_RETURNED_VALUE%:*} + [[ $G_WHIP_RETURNED_VALUE =~ : ]] && server_port=${G_WHIP_RETURNED_VALUE##*:} + + G_WHIP_INPUTBOX 'Please enter the authentication token of your frp server:' + token=$G_WHIP_RETURNED_VALUE fi # Pre-create config file to turn on admin UI