summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorParty Wumpus <48649272+PartyWumpus@users.noreply.github.com>2023-01-11 17:02:35 +0000
committerGitHub <noreply@github.com>2023-01-11 17:02:35 +0000
commit04935c3af2432f8a8fdbe0d6fb95f6e43713896e (patch)
tree8e0a68d2b94be8946c55229a2d99d383616680f0 /cli
parentaa5aa0dcdebfc8e720abb3efa4da1cde283d7f60 (diff)
downloaddecky-installer-04935c3af2432f8a8fdbe0d6fb95f6e43713896e.tar.gz
decky-installer-04935c3af2432f8a8fdbe0d6fb95f6e43713896e.zip
Create uninstall.sh
Diffstat (limited to 'cli')
-rw-r--r--cli/uninstall.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/cli/uninstall.sh b/cli/uninstall.sh
new file mode 100644
index 0000000..988cf63
--- /dev/null
+++ b/cli/uninstall.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+[ "$UID" -eq 0 ] || exec sudo "$0" "$@"
+
+echo "Uninstalling Steam Deck Plugin Loader..."
+
+USER_DIR="$(getent passwd $SUDO_USER | cut -d: -f6)"
+HOMEBREW_FOLDER="${USER_DIR}/homebrew"
+
+# Disable and remove services
+sudo systemctl disable --now plugin_loader.service > /dev/null
+sudo rm -f "${USER_DIR}/.config/systemd/user/plugin_loader.service"
+sudo rm -f "/etc/systemd/system/plugin_loader.service"
+
+# Remove temporary folder if it exists from the install process
+rm -rf "/tmp/plugin_loader"
+
+# Cleanup services folder
+sudo rm "${HOMEBREW_FOLDER}/services/PluginLoader"