mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Add installer changes
This commit is contained in:
parent
e765ccf303
commit
2158478894
13 changed files with 674 additions and 21 deletions
28
installer/scripts/darwin_preinstall.sh
Normal file
28
installer/scripts/darwin_preinstall.sh
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "Preparing to install Safe Chain..."
|
||||
|
||||
USER_HOME="${HOME}"
|
||||
if [ -z "${USER_HOME}" ]; then
|
||||
USER_HOME=~
|
||||
fi
|
||||
|
||||
# Stop existing service if running
|
||||
PLIST_PATH="${USER_HOME}/Library/LaunchAgents/com.aikido.safe-chain.plist"
|
||||
if [ -f "${PLIST_PATH}" ]; then
|
||||
echo "Stopping existing Safe Chain service..."
|
||||
launchctl unload "${PLIST_PATH}" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Clear any existing environment variables from previous installation
|
||||
launchctl unsetenv HTTPS_PROXY 2>/dev/null || true
|
||||
launchctl unsetenv GLOBAL_AGENT_HTTP_PROXY 2>/dev/null || true
|
||||
launchctl unsetenv NODE_EXTRA_CA_CERTS 2>/dev/null || true
|
||||
|
||||
# Remove old binary if exists
|
||||
if [ -f /usr/local/bin/safe-chain ]; then
|
||||
rm -f /usr/local/bin/safe-chain
|
||||
fi
|
||||
|
||||
exit 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue