mirror of
https://github.com/techahold/rustdeskinstall.git
synced 2024-07-02 10:36:15 +02:00
Some tweaks
tested and working on ZorinOS and Pop!
This commit is contained in:
parent
cf592f34c3
commit
303c19668a
31
install.sh
31
install.sh
|
@ -34,7 +34,15 @@ if [ -f /etc/os-release ]; then
|
||||||
. /etc/os-release
|
. /etc/os-release
|
||||||
OS=$NAME
|
OS=$NAME
|
||||||
VER=$VERSION_ID
|
VER=$VERSION_ID
|
||||||
IDLIKE=$ID_LIKE
|
|
||||||
|
UPSTREAM_ID=${ID_LIKE,,}
|
||||||
|
|
||||||
|
# Fallback to ID_LIKE if ID was not 'ubuntu' or 'debian'
|
||||||
|
if [ "${UPSTREAM_ID}" != "debian" ] && [ "${UPSTREAM_ID}" != "ubuntu" ]; then
|
||||||
|
UPSTREAM_ID="$(echo ${ID_LIKE,,} | sed s/\"//g | cut -d' ' -f1)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
elif type lsb_release >/dev/null 2>&1; then
|
elif type lsb_release >/dev/null 2>&1; then
|
||||||
# linuxbase.org
|
# linuxbase.org
|
||||||
OS=$(lsb_release -si)
|
OS=$(lsb_release -si)
|
||||||
|
@ -62,18 +70,27 @@ else
|
||||||
VER=$(uname -r)
|
VER=$(uname -r)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# output ebugging info if $DEBUG set
|
||||||
|
if [ "$DEBUG" = "true" ]; then
|
||||||
|
echo "OS: $OS"
|
||||||
|
echo "VER: $VER"
|
||||||
|
echo "UPSTREAM_ID: $UPSTREAM_ID"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Setup prereqs for server
|
# Setup prereqs for server
|
||||||
# common named prereqs
|
# common named prereqs
|
||||||
prereq="curl wget unzip tar"
|
prereq="curl wget unzip tar"
|
||||||
echo "Installing prerequisites"
|
echo "Installing prerequisites"
|
||||||
if [ "$OS" = "Ubuntu" ] || [ "$OS" = "Debian" ]; then
|
if [ "$OS" = "Ubuntu" ] || [ "$OS" = "Debian" ] || [ "${UPSTREAM_ID}" = "ubuntu" ] || [ "${UPSTREAM_ID}" = "debian" ]; then
|
||||||
prereq+=" dnsutils"
|
prereq+=" dnsutils"
|
||||||
apt-get update
|
sudo apt-get update
|
||||||
apt-get install -y "${prereq}" # git
|
sudo apt-get install -y "${prereq}" # git
|
||||||
elif [ "$OS" = "CentOS" ] || [ "$OS" = "RedHat" ]; then
|
elif [ "$OS" = "CentOS" ] || [ "$OS" = "RedHat" ]; then
|
||||||
prereq+=" bind-utils"
|
prereq+=" bind-utils"
|
||||||
yum update -y
|
sudo yum update -y
|
||||||
yum install -y "${prereq}" # git
|
sudo yum install -y "${prereq}" # git
|
||||||
else
|
else
|
||||||
echo "Unsupported OS"
|
echo "Unsupported OS"
|
||||||
# here you could ask the user for permission to try and install anyway
|
# here you could ask the user for permission to try and install anyway
|
||||||
|
@ -182,7 +199,7 @@ while ! [[ $CHECK_RUSTDESK_READY ]]; do
|
||||||
sleep 3
|
sleep 3
|
||||||
done
|
done
|
||||||
|
|
||||||
pubname=$(find /opt/rustdesk -name *.pub)
|
pubname=$(find /opt/rustdesk -name "*.pub")
|
||||||
key=$(cat "${pubname}")
|
key=$(cat "${pubname}")
|
||||||
|
|
||||||
rm rustdesk-server-linux-x64.zip
|
rm rustdesk-server-linux-x64.zip
|
||||||
|
|
27
update.sh
27
update.sh
|
@ -14,7 +14,12 @@ if [ -f /etc/os-release ]; then
|
||||||
. /etc/os-release
|
. /etc/os-release
|
||||||
OS=$NAME
|
OS=$NAME
|
||||||
VER=$VERSION_ID
|
VER=$VERSION_ID
|
||||||
IDLIKE=$ID_LIKE
|
UPSTREAM_ID=${ID_LIKE,,}
|
||||||
|
# Fallback to ID_LIKE if ID was not 'ubuntu' or 'debian'
|
||||||
|
if [ "${UPSTREAM_ID}" != "debian" ] && [ "${UPSTREAM_ID}" != "ubuntu" ]; then
|
||||||
|
UPSTREAM_ID="$(echo ${ID_LIKE,,} | sed s/\"//g | cut -d' ' -f1)"
|
||||||
|
fi
|
||||||
|
|
||||||
elif type lsb_release >/dev/null 2>&1; then
|
elif type lsb_release >/dev/null 2>&1; then
|
||||||
# linuxbase.org
|
# linuxbase.org
|
||||||
OS=$(lsb_release -si)
|
OS=$(lsb_release -si)
|
||||||
|
@ -42,18 +47,28 @@ else
|
||||||
VER=$(uname -r)
|
VER=$(uname -r)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# output ebugging info if $DEBUG set
|
||||||
|
if [ "$DEBUG" = "true" ]; then
|
||||||
|
echo "OS: $OS"
|
||||||
|
echo "VER: $VER"
|
||||||
|
echo "UPSTREAM_ID: $UPSTREAM_ID"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Setup prereqs for server
|
# Setup prereqs for server
|
||||||
# common named prereqs
|
# common named prereqs
|
||||||
prereq="curl wget unzip tar"
|
prereq="curl wget unzip tar"
|
||||||
echo "Installing prerequisites"
|
echo "Installing prerequisites"
|
||||||
if [ "$OS" = "Ubuntu" ] || [ "$OS" = "Debian" ]; then
|
if [ "$OS" = "Ubuntu" ] || [ "$OS" = "Debian" ] || [ "${UPSTREAM_ID}" = "ubuntu" ] || [ "${UPSTREAM_ID}" = "debian" ]; then
|
||||||
prereq+=" dnsutils"
|
prereq+=" dnsutils"
|
||||||
apt-get update
|
sudo apt-get update
|
||||||
apt-get install -y "${prereq}" # git
|
sudo apt-get install -y "${prereq}" # git
|
||||||
elif [ "$OS" = "CentOS" ] || [ "$OS" = "RedHat" ]; then
|
elif [ "$OS" = "CentOS" ] || [ "$OS" = "RedHat" ]; then
|
||||||
prereq+=" bind-utils"
|
prereq+=" bind-utils"
|
||||||
yum update -y
|
sudo yum update -y
|
||||||
yum install -y "${prereq}" # git
|
sudo yum install -y "${prereq}" # git
|
||||||
else
|
else
|
||||||
echo "Unsupported OS"
|
echo "Unsupported OS"
|
||||||
# here you could ask the user for permission to try and install anyway
|
# here you could ask the user for permission to try and install anyway
|
||||||
|
|
Loading…
Reference in New Issue
Block a user