mirror of
https://github.com/techahold/rustdeskinstall.git
synced 2025-12-21 16:11:15 +01:00
Update linuxclientinstall.sh
This commit is contained in:
@@ -10,7 +10,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)
|
||||||
@@ -39,25 +47,20 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Install Rustdesk
|
# Install Rustdesk
|
||||||
case ${OS,,} in
|
echo "Installing Rustdesk"
|
||||||
# or case ${IDLIKE,,} in .. to support derivatives
|
if [ "${ID}" = "debian" ] || [ "$OS" = "Ubuntu" ] || [ "$OS" = "Debian" ] || [ "${UPSTREAM_ID}" = "ubuntu" ] || [ "${UPSTREAM_ID}" = "debian" ]; then
|
||||||
ubuntu|debian)
|
wget https://github.com/rustdesk/rustdesk/releases/download/1.1.9/rustdesk-1.1.9.deb
|
||||||
# Debian/Ubuntu/etc.
|
sudo apt install -fy ./rustdesk-1.1.9.deb
|
||||||
wget https://github.com/rustdesk/rustdesk/releases/download/1.1.9/rustdesk-1.1.9.deb
|
elif [ "$OS" = "CentOS" ] || [ "$OS" = "RedHat" ] || [ "${UPSTREAM_ID}" = "rhel" ] ; then
|
||||||
sudo apt install -fy ./rustdesk-1.1.9.deb
|
wget https://github.com/rustdesk/rustdesk/releases/download/1.1.9/rustdesk-1.1.9.rpm
|
||||||
;;
|
sudo yum localinstall ./rustdesk-1.1.9.rpm
|
||||||
fedora|centos|redhat|amazon)
|
else
|
||||||
# Red Hat, CentOS, etc.
|
echo "Unsupported OS"
|
||||||
|
# here you could ask the user for permission to try and install anyway
|
||||||
wget https://github.com/rustdesk/rustdesk/releases/download/1.1.9/rustdesk-1.1.9.rpm
|
# if they say yes, then do the install
|
||||||
sudo yum localinstall ./rustdesk-1.1.9.rpm
|
# if they say no, exit the script
|
||||||
# sudo dnf install -y ./rustdesk-1.1.9.rpm
|
exit 1
|
||||||
;;
|
fi
|
||||||
*)
|
|
||||||
echo "Unsupported OS"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
rustdesk --password ${admintoken}
|
rustdesk --password ${admintoken}
|
||||||
sudo pkill -f "rustdesk"
|
sudo pkill -f "rustdesk"
|
||||||
|
|||||||
Reference in New Issue
Block a user