inital commit

This commit is contained in:
2021-01-16 00:08:06 +01:00
commit 23bfefebf8
10 changed files with 365 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
[Unit]
Description=ShellHub Agent
Wants=network-online.target
[Service]
Type=simple
Environment=SHELLHUB_PRIVATE_KEY=/opt/ShellHubAgent/shellhub.key
Environment=SHELLHUB_TENANT_ID=SERVER_TENID
Environment=SHELLHUB_SERVER_ADDRESS=SERVER_ADDR
Environment=SHELLHUB_KEEPALIVE_INTERVAL=300
ExecStart=/opt/ShellHubAgent/ShellHubAgent
[Install]
WantedBy=multi-user.target

17
Agent/installAgent.sh Normal file
View File

@@ -0,0 +1,17 @@
##Build of a release tag
RelVer=stable
##Build of a master branch, but config is vaidated
#RelVer=latest_Tested
##Build of a master branch
#RelVer=latest
SERVER_ADDRESS=<unset>
TENANT_ID=<unset>
mkdir -p /opt/ShellHubAgent
wget https://git.bprieshof.nl/ci/Releases/ShellHub/"$RelVer"/BinAgent/ShellHubAgent-amd64 -O /opt/ShellHubAgent/ShellHubAgent
wget https://git.bprieshof.nl/Tools/ShellHubNative/raw/branch/master/Agent/ShellHubAgent.service -O /etc/systemd/system/ShellHubAgent.service
chmod +x /opt/ShellHub/ShellHubAgent
sed -i -e 's/SERVER_TENID/'$TENANT_ID'/g' -e 's/SERVER_ADDR/'$SERVER_ADDRESS'/g' /etc/systemd/system/ShellHubSSH.service
systemctl daemon-reload
systemctl enable --now ShellHubAgent