chore: 统一本地服务器与远程仓库源码
- 合并 main 与 master 历史并以服务器结构为基线 - 保留迁移、数据保留、AWS 账单与部署安全能力 - 建立 SDD 规格和 CI 验证闭环
This commit is contained in:
commit
fd60361d93
460 files changed
+37492
-23871
No files matched your search
@@ -8,6 +8,7 @@ set -e
|
||||
# 默认参数
|
||||
AIOPS_SERVER=""
|
||||
AGENT_TOKEN=""
|
||||
AGENT_HOSTNAME=""
|
||||
INSTALL_DIR="/usr/local/bin"
|
||||
SERVICE_NAME="aiops-agent"
|
||||
PLIST_LABEL="com.ezops.aiops-agent"
|
||||
@@ -34,6 +35,7 @@ while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
--server) AIOPS_SERVER="$2"; shift 2;;
|
||||
--token) AGENT_TOKEN="$2"; shift 2;;
|
||||
--hostname) AGENT_HOSTNAME="$2"; shift 2;;
|
||||
--version) AGENT_VERSION="$2"; shift 2;;
|
||||
*) echo "未知参数: $1"; exit 1;;
|
||||
esac
|
||||
@@ -142,6 +144,8 @@ if [ "$OS_LOWER" = "darwin" ]; then
|
||||
<string>10</string>
|
||||
<string>-token</string>
|
||||
<string>${AGENT_TOKEN}</string>
|
||||
<string>-hostname</string>
|
||||
<string>${AGENT_HOSTNAME}</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
@@ -193,7 +197,7 @@ Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=${INSTALL_DIR}/aiops-agent -server ${AIOPS_SERVER} -interval 10 -token ${AGENT_TOKEN}
|
||||
ExecStart=${INSTALL_DIR}/aiops-agent -server ${AIOPS_SERVER} -interval 10 -token ${AGENT_TOKEN} -hostname ${AGENT_HOSTNAME}
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
LimitNOFILE=65536
|
||||
|
||||
Reference in new issue
Block a user