Added reregister flag and additional logging#108
Conversation
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.
evanburkeyhl
left a comment
There was a problem hiding this comment.
Looks good, just have one question before approval
apackel-huntress
left a comment
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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.