Easy install Script for Rustdesk
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update install.sh

authored by

dinger1986 and committed by
GitHub
4977bd76 fc9a9351

+26 -24
+26 -24
install.sh
··· 4 4 uname=$(whoami) 5 5 admintoken=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c16) 6 6 7 - # Choice for DNS or IP 8 - PS3='Choose your preferred option, IP or DNS/Domain:' 9 - WAN=("IP" "DNS/Domain") 10 - select WANOPT in "${WAN[@]}"; do 11 - case $WANOPT in 12 - "IP") 13 - wanip=$(dig @resolver4.opendns.com myip.opendns.com +short) 14 - break 15 - ;; 16 - 17 - "DNS/Domain") 18 - echo -ne "Enter your preferred domain/dns address ${NC}: " 19 - read wanip 20 - #check wanip is valid domain 21 - if ! [[ $wanip =~ ^[a-zA-Z0-9]+([a-zA-Z0-9.-]*[a-zA-Z0-9]+)?$ ]]; then 22 - echo -e "${RED}Invalid domain/dns address${NC}" 23 - exit 1 24 - fi 25 - break 26 - ;; 27 - *) echo "invalid option $REPLY";; 28 - esac 29 - done 30 - 31 7 # identify OS 32 8 if [ -f /etc/os-release ]; then 33 9 # freedesktop.org and systemd ··· 101 77 # if they say no, exit the script 102 78 exit 1 103 79 fi 80 + 81 + # Choice for DNS or IP 82 + PS3='Choose your preferred option, IP or DNS/Domain:' 83 + WAN=("IP" "DNS/Domain") 84 + select WANOPT in "${WAN[@]}"; do 85 + case $WANOPT in 86 + "IP") 87 + wanip=$(dig @resolver4.opendns.com myip.opendns.com +short) 88 + break 89 + ;; 90 + 91 + "DNS/Domain") 92 + echo -ne "Enter your preferred domain/dns address ${NC}: " 93 + read wanip 94 + #check wanip is valid domain 95 + if ! [[ $wanip =~ ^[a-zA-Z0-9]+([a-zA-Z0-9.-]*[a-zA-Z0-9]+)?$ ]]; then 96 + echo -e "${RED}Invalid domain/dns address${NC}" 97 + exit 1 98 + fi 99 + break 100 + ;; 101 + *) echo "invalid option $REPLY";; 102 + esac 103 + done 104 + 105 + 104 106 105 107 # #/* 106 108 # Alternatively since case is faster than if then else