-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathuninstall.sh
More file actions
executable file
·79 lines (66 loc) · 2.07 KB
/
Copy pathuninstall.sh
File metadata and controls
executable file
·79 lines (66 loc) · 2.07 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
#!/bin/bash
#
# VibeConduit Uninstaller
# Usage: curl -fsSL https://raw.githubusercontent.com/rvbiljouw/vibeconduit/main/uninstall.sh | bash
#
set -euo pipefail
INSTALL_DIR="${INSTALL_DIR:-$HOME/.local/bin}"
RED='\033[0;31m'
GREEN='\033[0;32m'
BLUE='\033[0;34m'
NC='\033[0m'
info() {
echo -e "${BLUE}==>${NC} $1"
}
success() {
echo -e "${GREEN}==>${NC} $1"
}
main() {
echo ""
echo " VibeConduit Uninstaller"
echo " ======================="
echo ""
# Stop service if running
if command -v systemctl &> /dev/null; then
info "Stopping systemd service..."
systemctl --user stop vibeconduit 2>/dev/null || true
systemctl --user disable vibeconduit 2>/dev/null || true
fi
# Stop daemon if running
if [[ -f "${INSTALL_DIR}/vibeconduit" ]]; then
info "Stopping daemon..."
"${INSTALL_DIR}/vibeconduit" stop 2>/dev/null || true
fi
# Remove binaries
info "Removing binaries..."
rm -f "${INSTALL_DIR}/vibeconduit"
rm -f "${INSTALL_DIR}/vibeconduitd"
rm -f "${INSTALL_DIR}/vibeconduit-tray"
# Remove data directory
local data_dir="${XDG_DATA_HOME:-$HOME/.local/share}/vibeconduit"
if [[ -d "$data_dir" ]]; then
info "Removing data directory..."
rm -rf "$data_dir"
fi
# Remove systemd service
local systemd_service="${HOME}/.config/systemd/user/vibeconduit.service"
if [[ -f "$systemd_service" ]]; then
info "Removing systemd service..."
rm -f "$systemd_service"
systemctl --user daemon-reload 2>/dev/null || true
fi
# Remove runtime files
local runtime_dir="${XDG_RUNTIME_DIR:-/run/user/$(id -u)}/vibeconduit"
if [[ -d "$runtime_dir" ]]; then
info "Removing runtime files..."
rm -rf "$runtime_dir"
fi
echo ""
success "VibeConduit has been uninstalled"
echo ""
echo "Note: Configuration in ~/.config/vibeconduit was preserved."
echo " Auth files in ~/.cli-proxy-api were preserved."
echo " Remove manually if desired."
echo ""
}
main "$@"