From 61603ecbf0cee347a7401940cebb432df5a82dac Mon Sep 17 00:00:00 2001 From: InkerBot Date: Mon, 17 Jun 2024 04:05:29 +0800 Subject: [PATCH] add setup script --- install.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 install.sh diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..c005944 --- /dev/null +++ b/install.sh @@ -0,0 +1,16 @@ +#!/bin/bash +apt update && apt upgrade -y +apt install -y git curl unzip docker.io +wget -O buildAgentFull.zip https://teamcity.nld.inker.bot/update/buildAgentFull-Linux-x64.zip +unzip buildAgentFull.zip -d agent +rm buildAgentFull.zip + + +wget -O /lib/systemd/system/teamcityagent.service https://git.inker.bot/inksnow/teamcity-agent-install/raw/branch/main/teamcityagent.service + +sed -i 's/http:\/\/localhost:8111\//https:\/\/teamcity.nld.inker.bot\//g' /root/agent/conf/buildAgent.properties +sed -i "s/Default Agent/$(hostname)/g" /root/agent/conf/buildAgent.properties + +docker run --privileged --rm tonistiigi/binfmt --install all +docker rmi tonistiigi/binfmt +systemctl enable --now teamcityagent