mirror of
https://github.com/techahold/rustdeskinstall.git
synced 2025-05-13 07:29:04 +02:00
commit
1303936d51
25
install.sh
25
install.sh
@ -4,6 +4,26 @@
|
||||
uname=$(whoami)
|
||||
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
|
||||
if [[ $(which yum) ]]; then
|
||||
@ -94,9 +114,6 @@ while ! [[ $CHECK_RUSTDESK_READY ]]; do
|
||||
sleep 3
|
||||
done
|
||||
|
||||
#Get WAN IP
|
||||
wanip=$(dig @resolver4.opendns.com myip.opendns.com +short)
|
||||
|
||||
pubname=$(find /opt/rustdesk -name *.pub)
|
||||
key=$(cat "${pubname}")
|
||||
|
||||
@ -165,7 +182,7 @@ sudo systemctl enable gohttpserver.service
|
||||
sudo systemctl start gohttpserver.service
|
||||
|
||||
|
||||
echo -e "Your IP is ${wanip}"
|
||||
echo -e "Your IP/DNS Address is ${wanip}"
|
||||
echo -e "Your public key is ${key}"
|
||||
echo -e "Install Rustdesk on your machines and change your public key and IP/DNS name to the above"
|
||||
echo -e "You can access your install scripts for clients by going to http://${wanip}:8000"
|
||||
|
Loading…
x
Reference in New Issue
Block a user