Documentation Errors
Closed this issue · 3 comments
MacOS Agent Uninstall
Full script
#!/bin/sh echo "This will uninstall the Lithnet Access Manager Agent, and remove all configuration for this machine" read -p "Are you sure? " -n 1 -r echo if [ $REPLY =~ ^[Yy]$ ] then /bin/launchctl unload "/Library/LaunchDaemons/io.lithnet.accessmanager.agent.plist" rm "/Library/LaunchDaemons/io.lithnet.accessmanager.agent.plist" rm -rf "/Library/Application Support/Lithnet/AccessManagerAgent" fi
The link https://docs.lithnet.io/ams/installation/installing-the-access-manager-agent/installing-the-access-manager-agent-macos describes the following steps
Uninstalling the agent
You can use the uninstallation script provided to remove the agent from the computer.
sudo /Library/Application\ Support/Lithnet/AccessManagerAgent/Core/Lithnet.AccessManager.Agent/uninstall.sh
but the uninstall.sh is not there, instead it is here
/Library/Application\ Support/Lithnet/AccessManagerAgent/Core/uninstall.sh
Further problems, when running the script
sh /Library/Application\ Support/Lithnet/AccessManagerAgent/Core/uninstall.sh
it throws an error
sh /Library/Application\ Support/Lithnet/AccessManagerAgent/Core/uninstall.sh
This will uninstall the Lithnet Access Manager Agent, and remove all configuration for this machine
Are you sure? y
/Library/Application Support/Lithnet/AccessManagerAgent/Core/uninstall.sh: line 5: [: =~: binary operator expected
If we ran the lines individually, the 1st one fails
/bin/launchctl unload "/Library/LaunchDaemons/io.lithnet.accessmanager.agent.plist"
Warning: Expecting a LaunchAgents path since the command was ran as root. Got LaunchDaemons instead.
`launchctl bootout` is a recommended alternative.
Unload failed: 5: Input/output error
Try running `launchctl bootout` as root for richer errors.
Hi @gbica-hzo,
Thank you for pointing this out!
I believe this may be a ZSH vs. Bash script difference, as this script was developed when macOS used bash
as the default shell.
We will update the documentation accordingly.
Thanks!
@jcspencer Note there are 2 issue here.
- The uninstall script path is incorrect in the docs.
- The uninstall script does not perform uninstall.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs.