Updated tools for new version and add agent scipt

This commit is contained in:
2021-01-17 01:24:25 +01:00
parent e9e0e8a186
commit 66a02d9175
12 changed files with 341 additions and 1 deletions

View File

@@ -71,11 +71,18 @@ systemctl start openresty mongod
wget https://git.bprieshof.nl/ci/Releases/ShellHub/"$RelVer"/.env -O /opt/ShellHub/shellhub.env
wget https://git.bprieshof.nl/ci/Releases/ShellHub/"$RelVer"/BinServices/ShellHubSSH-amd64 -O /opt/ShellHub/ShellHubSSH
wget https://git.bprieshof.nl/ci/Releases/ShellHub/"$RelVer"/BinServices/ShellHubAPI-amd64 -O /opt/ShellHub/ShellHubAPI
wget https://git.bprieshof.nl/ci/Releases/ShellHub/"$RelVer"/BinAgent/ShellHubAgent-amd64 -O /opt/ShellHub/ui/agent-amd64
wget https://git.bprieshof.nl/ci/Releases/ShellHub/"$RelVer"/BinServices/webui.tar.gz -O /tmp/webui.tar.gz
mv ../Agent/Kickstart_template /opt/ShellHub/ui/kickstart.sh
chmod +x /opt/ShellHub/ShellHubAPI
chmod +x /opt/ShellHub/ShellHubSSH
tar -zxf /tmp/webui.tar.gz -C /opt/ShellHub/ui
mv Tools/* /opt/ShellHub/tools/
if [ "$RelVer" = "stable" ]
mv Tools/stable/* /opt/ShellHub/tools/
elif [ "$RelVer" = "latest" ] || [ "$RelVer" = "latest_Tested" ]; then
$PKGM install -y jq
mv Tools/latest/* /opt/ShellHub/tools/
fi
##Generating keys
openssl genrsa -out /opt/ShellHub/keys/api_private_key 2048