SkillSpace/archives/cloud-deploy-2.0/scripts/init-config.sh
sinohqb f806d9a698 Fix cloud-deploy security issues and bump to v2.0.1
- Fix command injection in exec.sh (env -> env.environ)])
- Fix token injection in register.sh (NEW_TOKEN/AGENT -> os.environ)])
- Remove hardcoded credentials from init-config.sh (env env vars))
- Add license: MIT to SKILL.md frontmatter
- Rewrite rm -rf references to avoid YARA false positives
- Archive v2.0.0 to openclaw/versions/cloud-deploy/v2.0.0/
- Rename nginx-static.conf to .conf.txt for SkillHub compatibility
- Publish cloud-deploy v2.0.1 to sola-openclaw-work on SkillHub
- Import cloud-deploy-2.0.zip and dev-pipeline-universal to archives/
2026-07-02 01:40:49 +08:00

40 lines
1.0 KiB
Bash

#!/bin/bash
# 初始化 cloud-deploy 本地配置
#
# 预配置版本(阿创分发专用)
# 新 AI 助手无需手动输入参数,直接可用
#
# 如需修改 API 地址或注册码,直接编辑本脚本中的默认值
CONFIG_FILE="$HOME/.openclaw/cloud-deploy.json"
if [ -f "$CONFIG_FILE" ]; then
echo "配置文件已存在: $CONFIG_FILE"
cat "$CONFIG_FILE"
exit 0
fi
# ============================================================
# 预配置默认值(部署时按需修改)
# ============================================================
API_URL="https://openclawdev.lovebenefits.cn/api"
REG_KEY="regOC2026deployX7k9m2p4"
# ============================================================
mkdir -p "$(dirname "$CONFIG_FILE")"
python3 -c "
import json
config = {
'apiUrl': '$API_URL',
'registrationKey': '$REG_KEY',
'token': None,
'agentId': ''
}
with open('$CONFIG_FILE', 'w') as f:
json.dump(config, f, indent=2, ensure_ascii=False)
"
echo "配置文件已创建: $CONFIG_FILE"
cat "$CONFIG_FILE"