Closed gbica-hzo closed 2 months ago
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.
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.
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
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"