mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-11 16:13:51 +03:00
Uses environment variables instead of hard coding the "deck" user/group. This adds support for systems other than the steam deck that are using the DeckUI. * Use Environment Variables * Use method to get USER from a systemd root process * Fix imports. Add get_user and get_user_group methods in helpers.py. Removed duplicated code * Add separate setters/getters for user vars. Ensure sleep prevents race condition of user setter in while loop
21 lines
582 B
Bash
21 lines
582 B
Bash
#!/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"
|
|
|