Files
openclaw-ollama-toolcall-proxy/uninstall-launchagent.sh
hotwa ebd73e1c69 feat: add macOS LaunchAgent install/uninstall scripts
- Add install-launchagent.sh for auto-start on boot
- Add uninstall-launchagent.sh for service removal
- Update README.md with deployment instructions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 16:02:40 +08:00

38 lines
908 B
Bash
Executable File

#!/bin/bash
# OpenClaw Ollama Toolcall Proxy - macOS LaunchAgent 卸载脚本
set -e
SERVICE_NAME="com.openclaw.ollama-proxy"
PLIST_PATH="$HOME/Library/LaunchAgents/${SERVICE_NAME}.plist"
LOG_DIR="$HOME/Library/Logs/OpenClawOllamaProxy"
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
echo -e "${YELLOW}=== OpenClaw Ollama Proxy LaunchAgent 卸载 ===${NC}"
echo ""
# 停止并卸载服务
if launchctl list "$SERVICE_NAME" &> /dev/null; then
launchctl bootout gui/$(id -u) "$PLIST_PATH"
echo -e "${GREEN}${NC} 停止并卸载服务"
else
echo -e "${YELLOW}服务未运行${NC}"
fi
# 删除 plist 文件
if [ -f "$PLIST_PATH" ]; then
rm "$PLIST_PATH"
echo -e "${GREEN}${NC} 删除 plist 文件: $PLIST_PATH"
fi
echo ""
echo -e "${GREEN}=== 卸载完成 ===${NC}"
echo ""
echo "日志目录保留在: $LOG_DIR"
echo "如需删除日志: rm -rf $LOG_DIR"