-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new macOS installation instructions (#15)
* new release instructions * add uninstallation script to the installation dir. * fix CI * upgrade CI actions * upgrade to chechout action v4 * update setup action to v5 * CI: fix packaging * CI: remove nested folder * update mac scripts. * tiny fix.
- Loading branch information
Showing
5 changed files
with
140 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
# Define the directory again in the wrapper script, it will use the value assigned during installation | ||
COVALENT_DIR="${COVALENT_DIR:-$HOME/.covalent}" # Default to ~/.covalent if not set | ||
SERVICE_NAME="${EXECUTABLE:-light-client}" # Default to light-client if not set | ||
GCP_CREDENTIALS="${GCP_CREDENTIALS:-gcp-credentials.json}" # Default to gcp-credentials.json if not set | ||
|
||
# Ensure that only one instance of the service is running | ||
if pgrep -f "$SERVICE_NAME" > /dev/null 2>&1; then | ||
echo "$SERVICE_NAME is already running." | ||
exit 1 | ||
fi | ||
|
||
# Wait for IPFS daemon to start by checking if it is listening on port 5001 | ||
echo "Waiting for IPFS daemon to start on port 5001..." | ||
until lsof -i :5001 | grep LISTEN > /dev/null; do | ||
printf '.' | ||
sleep 1 | ||
done | ||
echo "IPFS daemon has started." | ||
|
||
# Run your service binary with all the arguments | ||
"$COVALENT_DIR/$SERVICE_NAME" \ | ||
--loglevel debug \ | ||
--rpc-url wss://moonbase-alpha.blastapi.io/618fd77b-a090-457b-b08a-373398006a5e \ | ||
--contract 0x916B54696A70588a716F899bE1e8f2A5fFd5f135 \ | ||
--topic-id DAS-TO-BQ \ | ||
--gcp-creds-file "$COVALENT_DIR/$GCP_CREDENTIALS" \ | ||
--client-id "$CLIENT_ID" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
|
||
# Paths for the old setup | ||
OLD_COVALENT_DIR="$HOME/.covalenthq" | ||
OLD_PLIST_FILE="com.covalenthq.light-client.plist" | ||
OLD_IPFS_PLIST_FILE="com.covalenthq.ipfs.plist" | ||
|
||
# Paths for the new setup | ||
COVALENT_DIR="$HOME/.covalent" | ||
PLIST_FILE="com.covalent.light-client.plist" | ||
IPFS_PLIST_FILE="com.covalent.ipfs.plist" | ||
|
||
# Function to unload and remove plist files | ||
remove_plist() { | ||
local plist_file="$1" | ||
if [ -f "$HOME/Library/LaunchAgents/$plist_file" ]; then | ||
launchctl unload "$HOME/Library/LaunchAgents/$plist_file" || echo "Failed to unload $plist_file" | ||
rm "$HOME/Library/LaunchAgents/$plist_file" || echo "Failed to remove $plist_file" | ||
fi | ||
} | ||
|
||
# Function to remove directories | ||
remove_directory() { | ||
local dir="$1" | ||
if [ -d "$dir" ]; then | ||
rm -rf "$dir" || echo "Failed to remove directory $dir" | ||
fi | ||
} | ||
|
||
# Unload and remove plist files for both old and new setups | ||
remove_plist "$PLIST_FILE" | ||
remove_plist "$IPFS_PLIST_FILE" | ||
remove_plist "$OLD_PLIST_FILE" | ||
remove_plist "$OLD_IPFS_PLIST_FILE" | ||
|
||
# Remove the .covalent and .covalenthq directories and their contents | ||
remove_directory "$COVALENT_DIR" | ||
remove_directory "$OLD_COVALENT_DIR" | ||
|
||
echo "Uninstallation completed. The light client and IPFS daemons for both old and new versions have been removed." |