mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Add installer build scripts and configuration
This commit is contained in:
parent
fb3a8582a2
commit
3420290ea9
22 changed files with 1377 additions and 7 deletions
39
installer/scripts/templates/uninstall.sh
Normal file
39
installer/scripts/templates/uninstall.sh
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#!/bin/bash
|
||||
# Aikido Safe Chain Uninstaller
|
||||
|
||||
set -e
|
||||
|
||||
echo "Uninstalling Aikido Safe Chain Agent..."
|
||||
|
||||
INSTALL_DIR="/Library/Application Support/AikidoSafety"
|
||||
LAUNCHD_PLIST="/Library/LaunchDaemons/dev.aikido.safe-chain.plist"
|
||||
|
||||
# Stop and remove daemon
|
||||
if [ -f "$LAUNCHD_PLIST" ]; then
|
||||
echo "Stopping agent..."
|
||||
launchctl unload "$LAUNCHD_PLIST" 2>/dev/null || true
|
||||
rm "$LAUNCHD_PLIST"
|
||||
fi
|
||||
|
||||
# Remove certificate
|
||||
echo "Removing CA certificate..."
|
||||
security delete-certificate -c "Aikido Safe Chain CA" \
|
||||
/Library/Keychains/System.keychain 2>/dev/null || true
|
||||
|
||||
# Restore proxy settings
|
||||
if [ -f "$INSTALL_DIR/agent/configure-proxy.js" ]; then
|
||||
echo "Restoring proxy settings..."
|
||||
"$INSTALL_DIR/bin/node" "$INSTALL_DIR/agent/configure-proxy.js" --uninstall || {
|
||||
echo "Warning: Failed to restore proxy settings. You may need to restore manually."
|
||||
}
|
||||
fi
|
||||
|
||||
# Remove files
|
||||
echo "Removing files..."
|
||||
rm -rf "$INSTALL_DIR"
|
||||
rm -rf /var/log/aikido-safe-chain
|
||||
|
||||
echo ""
|
||||
echo "✅ Aikido Safe Chain has been uninstalled."
|
||||
echo ""
|
||||
echo "Your system proxy settings have been restored to their original state."
|
||||
Loading…
Add table
Add a link
Reference in a new issue