Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added reregister flag and additional logging #108

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Alan-Huntress
Copy link
Contributor

Key changes:
-Reregister flag (-r) will remove Huntress prior to reinstalling it -If Huntress is detected on the machine the installer won't proceed unless the reregister flag is passed -More verbose logging for troubleshooting
-Grouped functions together to make the main code easier to read.

Key changes:
-Reregister flag (-r) will remove Huntress prior to reinstalling it
-If Huntress is detected on the machine the installer won't proceed unless the reregister flag is passed
-More verbose logging for troubleshooting
-Grouped functions together to make the main code easier to read.
Copy link
Contributor

@evanburkeyhl evanburkeyhl left a comment

Choose a reason for hiding this comment

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

Looks good, just have one question before approval

Bash/InstallHuntress-macOS-bash.sh Show resolved Hide resolved
Copy link
Contributor

@apackel-huntress apackel-huntress left a comment

Choose a reason for hiding this comment

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

Would prefer another person from the team to sign off on this too, but looks good to me. One comment that's just a question on a particular message.


countProcesses=$(ps aux | grep "HuntressAgent" -c)
if [ $countProcesses -le 1 ]; then
logger "Huntress process not running, System Extension may hang for a minute on uninstall"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason this message references the system extension specifically? Whether the Go agent (HuntressAgent) is running shouldn't have any effect on the removal of the extension. We'd need to check whether the Swift daemon (aka plain old Huntress) is running, since that's what's responsible for the extension.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was just something I noticed from testing. If I killed the Huntress processes before trying to remove the System Extension then the SE removal would pause for a period of time. I can adjust this to look for only plain Huntress instead.

@evanburkeyhl evanburkeyhl self-requested a review December 2, 2024 17:15
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