Update install.sh

This commit is contained in:
dinger1986
2022-08-10 18:19:46 +01:00
committed by GitHub
parent d02d7af640
commit bfd977f573

View File

@@ -4,6 +4,26 @@
uname=$(whoami) uname=$(whoami)
admintoken=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c16) admintoken=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c16)
# Choice for DNS or IP
PS3='Choose your preferred option, IP or DNS/Domain: '
WAN=("IP" "DNS/Domain")
select WANOPT in "${WAN[@]}"; do
case $WANOPT in
"IP")
wanip=$(dig @resolver4.opendns.com myip.opendns.com +short)
echo $wanip
break
;;
"DNS/Domain")
echo -ne "Enter your preferred domain/dns address ${NC}: "
read wanip
echo $wanip
break
;;
*) echo "invalid option $REPLY";;
esac
done
# Setup prereqs for server # Setup prereqs for server
if [[ $(which yum) ]]; then if [[ $(which yum) ]]; then
@@ -94,9 +114,6 @@ while ! [[ $CHECK_RUSTDESK_READY ]]; do
sleep 3 sleep 3
done done
#Get WAN IP
wanip=$(dig @resolver4.opendns.com myip.opendns.com +short)
pubname=$(find /opt/rustdesk -name *.pub) pubname=$(find /opt/rustdesk -name *.pub)
key=$(cat "${pubname}") key=$(cat "${pubname}")