Skip to content

Add uninstall action#2

Merged
actuallymentor merged 7 commits intoactuallymentor:mainfrom
mihaiconstantin:uninstall-command
Sep 5, 2022
Merged

Add uninstall action#2
actuallymentor merged 7 commits intoactuallymentor:mainfrom
mihaiconstantin:uninstall-command

Conversation

@mihaiconstantin
Copy link
Copy Markdown
Contributor

@mihaiconstantin mihaiconstantin commented Apr 13, 2022

Added a simple action to uninstall the smc tool and the battery script (i.e., partially addressing #1). From what I understand of the setup.sh scripts, the steps required to uninstall this utility are:

  1. reset battery charging
  2. remove smc and battery from /usr/local/bin

I am not entirely sure about (1), but I suppose this boils down to setting the CH0B and CH0C keys back to 00? Or is there another way to reset these keys to their corresponding defaults?

Copy link
Copy Markdown
Contributor Author

@mihaiconstantin mihaiconstantin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 5100905.

@livesamarthgupta
Copy link
Copy Markdown

livesamarthgupta commented Jul 5, 2022

You didn't handle the case in which the user might have run visudo. Might need to revert the changes done by visudo.

@mihaiconstantin
Copy link
Copy Markdown
Contributor Author

You didn't handle the case in which the user might have run visudo. Might need to revert the changes done by visudo.

Good point. I am erring on the side of caution since I don't really know how visudo works, which is why I left that part untouched.

@actuallymentor
Copy link
Copy Markdown
Owner

Thank you for the contribution @mihaiconstantin! One small addition request, could you increment the v0.0.3 line to v0.0.4?

Then I'll merge it :)

@mihaiconstantin
Copy link
Copy Markdown
Contributor Author

@actuallymentor, awesome! I see the following:

  • v0.0.3 in README.md
  • v0.0.3 in battery.sh

I incremented in both places to v0.0.4. Also, I removed some white space here
and there.

@actuallymentor actuallymentor merged commit 4e726be into actuallymentor:main Sep 5, 2022
@actuallymentor
Copy link
Copy Markdown
Owner

Thank you for the contribution!

@mihaiconstantin mihaiconstantin deleted the uninstall-command branch September 5, 2022 16:26
Chr1s70ph pushed a commit to Chr1s70ph/battery that referenced this pull request Apr 21, 2024
Apply accuracy-fix changes to bugfixes
panoskava pushed a commit to panoskava/battery that referenced this pull request Mar 17, 2026
panoskava pushed a commit to panoskava/battery that referenced this pull request Mar 17, 2026
Apply accuracy-fix changes to bugfixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants