Skip to content

Commit

Permalink
add removal of gui and desktop entry
Browse files Browse the repository at this point in the history
  • Loading branch information
shadeyg56 committed Feb 8, 2023
1 parent 4269370 commit 4379024
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion auto-cpufreq-installer
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,15 @@ function tool_remove {

tool_proc_rm="/usr/local/bin/auto-cpufreq --remove"
wrapper_script="/usr/local/bin/auto-cpufreq"
gui_wrapper_script="/usr/local/bin/auto-cpufreq-gtk"
unit_file="/etc/systemd/system/auto-cpufreq.service"
venv_path="/opt/auto-cpufreq"

cpufreqctl="/usr/local/bin/cpufreqctl.auto-cpufreq"
cpufreqctl_old="/usr/bin/cpufreqctl.auto-cpufreq"

desktop_file="/usr/share/applications/auto-cpufreq-gtk.desktop"

# stop any running auto-cpufreq argument (daemon/live/monitor)
tool_arg_pids=($(pgrep -f "auto-cpufreq --"))
for pid in "${tool_arg_pids[@]}"; do
Expand Down Expand Up @@ -252,10 +255,14 @@ function tool_remove {
[ -f $stats_file ] && rm $stats_file
[ -f $unit_file ] && rm $unit_file
[ -f $wrapper_script ] && rm $wrapper_script

[ -f $gui_wrapper_script ] && rm $gui_wrapper_script

[ -f $cpufreqctl ] && rm $cpufreqctl
[ -f $cpufreqctl_old ] && rm $cpufreqctl_old

[ -f $desktop_file ] && rm $desktop_file
update-desktop-database /usr/share/applications

# remove python virtual environment
rm -rf "${venv_path}"

Expand Down

0 comments on commit 4379024

Please sign in to comment.