Compare commits

..

2 Commits

Author SHA1 Message Date
Icedream a0920a6f87
Only attempt to disable service if still installed. 2025-05-22 15:19:30 +02:00
Icedream 656e6c9d27
Remove tweak-cpu-usage script.
This reverts commit 1c9bbb7559.
2025-05-22 15:15:52 +02:00
1 changed files with 16 additions and 7 deletions

View File

@ -54,14 +54,21 @@ install_files() {
}
remove_file() {
local path="$1" sha256hash="${2:-}"
if [ -n "${sha256hash}" ]; then
if ! check_file "${path}" "${sha256hash}"; then
return
fi
fi
rm -v "$path"
}
check_file() {
local path="$1" sha256hash="${2:-}"
if [ ! -f "$path" ]; then
return
fi
if [ -n "${sha256hash}" ] && ! sha256sum -c - <<< "${sha256hash} ${path}" >/dev/null 2>/dev/null; then
return
fi
rm -v "$path"
sha256sum -c - <<< "${sha256hash} ${path}" >/dev/null 2>/dev/null
}
###
@ -74,9 +81,11 @@ if command -v fc-cache >/dev/null 2>&1; then
fi
if command -v systemctl >/dev/null 2>&1; then
systemctl --user disable tweak-cpu-usage
remove_file "${HOME}/.config/systemd/user/tweak-cpu-usage.service" 6abf4488aa268b0171cb400270e2531c8fb067ebe8216c72d337f8c056952f9e
remove_file "${HOME}/.local/bin/tweak-cpu-usage" 7da1938cdf78e583140638848f8bf8a268c2710e4fa3462bca8373e438d67492
if check_file "${HOME}/.config/systemd/user/tweak-cpu-usage.service" 6abf4488aa268b0171cb400270e2531c8fb067ebe8216c72d337f8c056952f9e; then
systemctl --user disable tweak-cpu-usage || true
remove_file "${HOME}/.config/systemd/user/tweak-cpu-usage.service"
fi
remove_file "${HOME}/.local/bin/tweak-cpu-usage" 7da1938cdf78e583140638848f8bf8a268c2710e4fa3462bca8373e438d67491
fi
# KDE 6