-
Notifications
You must be signed in to change notification settings - Fork 0
/
uninstall-macos.sh
executable file
·65 lines (51 loc) · 1.67 KB
/
uninstall-macos.sh
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
#!/bin/bash
function uninstall_ipfs_autoload() {
if [ -e ~/Library/LaunchAgents/ipfs-daemon.plist ]; then
echo "Uninstalling IPFS autoloader..."
# Unload launch agent
launchctl unload ~/Library/LaunchAgents/ipfs-daemon.plist
# Remove plist file
rm ~/Library/LaunchAgents/ipfs-daemon.plist
else
echo "IPFS autoloader not found, skipping."
fi
}
function uninstall_ipfs() {
if [ -e /usr/local/bin/ipfs ]; then
echo "Uninstalling IPFS..."
# Remove IPFS binary
rm /usr/local/bin/ipfs
# Remove IPFS data directory
rm -rf ~/.ipfs
else
echo "IPFS not found, skipping."
fi
}
function uninstall_ipfs_cluster_follow_autoload() {
if [ -e ~/Library/LaunchAgents/ipfs-cluster-follow.plist ]; then
echo "Uninstalling IPFS Cluster Follow autoloader..."
# Unload launch agent
launchctl unload ~/Library/LaunchAgents/ipfs-cluster-follow.plist
# Remove plist file
rm ~/Library/LaunchAgents/ipfs-cluster-follow.plist
else
echo "IPFS Cluster Follow autoloader not found, skipping."
fi
}
function uninstall_ipfs_cluster_follow() {
if [ -e /usr/local/bin/ipfs-cluster-follow ]; then
echo "Uninstalling IPFS Cluster Follow..."
# Remove IPFS Cluster Follow binary
rm /usr/local/bin/ipfs-cluster-follow
# Remove IPFS Cluster Follow data directory
rm -rf ~/.ipfs-cluster-follow
else
echo "IPFS Cluster Follow not found, skipping."
fi
}
# Uninstall autoloaders and executables for IPFS and IPFS Cluster Follow independently
uninstall_ipfs_autoload
uninstall_ipfs
uninstall_ipfs_cluster_follow_autoload
uninstall_ipfs_cluster_follow
echo "IPFS and IPFS Cluster Follow have been uninstalled successfully."