Add installer build scripts and configuration

This commit is contained in:
Reinier Criel 2025-11-25 08:21:35 -08:00
parent fb3a8582a2
commit 3420290ea9
22 changed files with 1377 additions and 7 deletions

View 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."