-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'staging' of github.com:hop-protocol/hop into production
- Loading branch information
Showing
8 changed files
with
89 additions
and
12 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 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,30 @@ | ||
#!/bin/bash | ||
|
||
# Function to install jq | ||
install_jq() { | ||
if command -v jq > /dev/null 2>&1; then | ||
echo "jq is already installed." | ||
return | ||
fi | ||
|
||
# Detect package manager and install jq | ||
if command -v apt > /dev/null 2>&1; then | ||
echo "Using apt to install jq..." | ||
sudo apt update | ||
sudo apt install -y jq | ||
elif command -v dnf > /dev/null 2>&1; then | ||
echo "Using dnf to install jq..." | ||
sudo dnf install -y jq | ||
elif command -v yum > /dev/null 2>&1; then | ||
echo "Using yum to install jq..." | ||
sudo yum install -y jq | ||
else | ||
echo "Package manager not supported. Please install jq manually." | ||
exit 1 | ||
fi | ||
|
||
echo "jq installation complete." | ||
} | ||
|
||
# Call the install function | ||
install_jq |
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,16 @@ | ||
#!/bin/bash | ||
|
||
# Port number to check | ||
PORT=4665 | ||
|
||
# Find process using the port and get its PID | ||
pid=$(lsof -t -i:$PORT) | ||
|
||
# Check if any process was found | ||
if [ -z "$pid" ]; then | ||
echo "No process is using port $PORT." | ||
else | ||
echo "Process $pid is using port $PORT. Killing it..." | ||
kill $pid | ||
echo "Process killed." | ||
fi |
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
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
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