mirror of
https://github.com/techahold/rustdeskinstall.git
synced 2025-05-13 15:38:59 +02:00
Update install.sh
This commit is contained in:
parent
2a76fd7ead
commit
d02d7af640
20
install.sh
20
install.sh
@ -113,22 +113,32 @@ sudo sed -i "s|wanipreg|${wanip}|g" linuxclientinstall.sh
|
|||||||
sudo sed -i "s|keyreg|${key}|g" linuxclientinstall.sh
|
sudo sed -i "s|keyreg|${key}|g" linuxclientinstall.sh
|
||||||
|
|
||||||
# Download and install gohttpserver
|
# Download and install gohttpserver
|
||||||
mkdir /opt/gohttp
|
# Make Folder /opt/gohttp/
|
||||||
mkdir /opt/gohttp/public
|
if [ ! -d "/opt/gohttp" ]; then
|
||||||
|
echo "Creating /opt/gohttp"
|
||||||
|
sudo mkdir -p /opt/gohttp/
|
||||||
|
sudo mkdir -p /opt/gohttp/public
|
||||||
|
fi
|
||||||
sudo chown "${uname}" -R /opt/gohttp
|
sudo chown "${uname}" -R /opt/gohttp
|
||||||
cd /opt/gohttp
|
cd /opt/gohttp
|
||||||
GOHTTPLATEST=$(curl https://api.github.com/repos/codeskyblue/gohttpserver/releases/latest -s | grep "tag_name"| awk '{print substr($2, 2, length($2)-3) }')
|
GOHTTPLATEST=$(curl https://api.github.com/repos/codeskyblue/gohttpserver/releases/latest -s | grep "tag_name"| awk '{print substr($2, 2, length($2)-3) }')
|
||||||
wget https://github.com/codeskyblue/gohttpserver/releases/download/${GOHTTPLATEST}/gohttpserver_${GOHTTPLATEST}_linux_amd64.tar.gz
|
TMPFILE=$(mktemp)
|
||||||
tar -xf gohttpserver_${GOHTTPLATEST}_linux_amd64.tar.gz
|
sudo wget "https://github.com/codeskyblue/gohttpserver/releases/download/${GOHTTPLATEST}/gohttpserver_${GOHTTPLATEST}_linux_amd64.tar.gz" -O "${TMPFILE}"
|
||||||
|
tar -xf "${TMPFILE}"
|
||||||
|
|
||||||
# Copy Rustdesk install scripts to folder
|
# Copy Rustdesk install scripts to folder
|
||||||
mv /opt/rustdesk/WindowsAgentAIOInstall.ps1 /opt/gohttp/public/
|
mv /opt/rustdesk/WindowsAgentAIOInstall.ps1 /opt/gohttp/public/
|
||||||
mv /opt/rustdesk/linuxclientinstall.sh /opt/gohttp/public/
|
mv /opt/rustdesk/linuxclientinstall.sh /opt/gohttp/public/
|
||||||
|
|
||||||
# Make gohttp log folders
|
# Make gohttp log folders
|
||||||
mkdir /var/log/gohttp/
|
if [ ! -d "/var/log/gohttp" ]; then
|
||||||
|
echo "Creating /var/log/gohttp"
|
||||||
|
sudo mkdir -p /var/log/gohttp/
|
||||||
|
fi
|
||||||
sudo chown "${uname}" -R /var/log/gohttp/
|
sudo chown "${uname}" -R /var/log/gohttp/
|
||||||
|
|
||||||
|
sudo rm "${TMPFILE}"
|
||||||
|
|
||||||
# Setup Systemd to launch Go HTTP Server
|
# Setup Systemd to launch Go HTTP Server
|
||||||
gohttpserver="$(cat << EOF
|
gohttpserver="$(cat << EOF
|
||||||
[Unit]
|
[Unit]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user