This repository was archived by the owner on Mar 4, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.sh
More file actions
executable file
·109 lines (92 loc) · 2.41 KB
/
uninstall.sh
File metadata and controls
executable file
·109 lines (92 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#!/bin/bash
#
# AgentsMesh Runner Uninstallation Script
#
# Usage:
# curl -fsSL https://raw.githubusercontent.com/AgentsMesh/AgentsMeshRunner/main/uninstall.sh | bash
#
set -e
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
BINARY_NAME="agentsmesh-runner"
INSTALL_DIR="/usr/local/bin"
CONFIG_DIR="$HOME/.agentsmesh"
info() {
echo -e "${BLUE}[INFO]${NC} $1"
}
success() {
echo -e "${GREEN}[SUCCESS]${NC} $1"
}
warn() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
error() {
echo -e "${RED}[ERROR]${NC} $1"
exit 1
}
# Stop service if running
stop_service() {
info "Checking for running service..."
# Try to stop the service if it exists
if command -v systemctl &> /dev/null; then
if systemctl is-active --quiet agentsmesh-runner 2>/dev/null; then
info "Stopping agentsmesh-runner service..."
sudo systemctl stop agentsmesh-runner || true
sudo systemctl disable agentsmesh-runner 2>/dev/null || true
fi
fi
# macOS launchd
if [ "$(uname)" = "Darwin" ]; then
if launchctl list | grep -q "ai.agentsmesh.runner" 2>/dev/null; then
info "Stopping launchd service..."
launchctl unload ~/Library/LaunchAgents/ai.agentsmesh.runner.plist 2>/dev/null || true
fi
fi
}
# Remove binary
remove_binary() {
local binary_path="$INSTALL_DIR/$BINARY_NAME"
if [ -f "$binary_path" ]; then
info "Removing $binary_path..."
if [ -w "$INSTALL_DIR" ]; then
rm -f "$binary_path"
else
sudo rm -f "$binary_path"
fi
success "Removed binary"
else
warn "Binary not found at $binary_path"
fi
}
# Ask about config removal
remove_config() {
if [ -d "$CONFIG_DIR" ]; then
echo ""
read -p "Do you want to remove configuration directory ($CONFIG_DIR)? [y/N] " -n 1 -r
echo ""
if [[ $REPLY =~ ^[Yy]$ ]]; then
info "Removing $CONFIG_DIR..."
rm -rf "$CONFIG_DIR"
success "Removed configuration directory"
else
info "Keeping configuration directory"
fi
fi
}
# Main
main() {
echo ""
echo -e "${YELLOW}AgentsMesh Runner Uninstaller${NC}"
echo ""
stop_service
remove_binary
remove_config
echo ""
success "AgentsMesh Runner has been uninstalled."
echo ""
}
main "$@"