Update Reconnect Peers
This commit is contained in:
parent
1ae874e50b
commit
44b91e9897
23
ghost.sh
Normal file → Executable file
23
ghost.sh
Normal file → Executable file
@ -777,6 +777,9 @@ stop_service() {
|
|||||||
|
|
||||||
|
|
||||||
reconnect_peers() {
|
reconnect_peers() {
|
||||||
|
|
||||||
|
GHOST_NODE_DIR="/root/ghost/ghost-node"
|
||||||
|
|
||||||
# Step 1: Stop the running Ghost node service
|
# Step 1: Stop the running Ghost node service
|
||||||
echo "Stopping the Ghost node..."
|
echo "Stopping the Ghost node..."
|
||||||
sudo systemctl stop ghost-node
|
sudo systemctl stop ghost-node
|
||||||
@ -786,8 +789,9 @@ reconnect_peers() {
|
|||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
# Step 2: Navigate to the Ghost node folder or exit if not found
|
# Step 2: Navigate to the Ghost node folder or exit if not found
|
||||||
echo "Navigating to the Ghost node folder..."
|
if [ -d "$GHOST_NODE_DIR" ]; then
|
||||||
cd ghost/ghost-node || { echo "Ghost node folder not found. Exiting."; exit 1; }
|
echo "Directory $GHOST_NODE_DIR exists."
|
||||||
|
cd "$GHOST_NODE_DIR"
|
||||||
|
|
||||||
# Inform the user and add a delay for better clarity
|
# Inform the user and add a delay for better clarity
|
||||||
print_info "Please wait ..."
|
print_info "Please wait ..."
|
||||||
@ -813,6 +817,14 @@ reconnect_peers() {
|
|||||||
print_info "Please wait ..."
|
print_info "Please wait ..."
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
|
# Rust Installation with rust_setup function
|
||||||
|
print_info "ReChecking Rust..."
|
||||||
|
rust_setup || { echo "Rust setup failed! Exiting."; exit 1; }
|
||||||
|
|
||||||
|
# Inform the user and add a delay for better clarity
|
||||||
|
print_info "Please wait ..."
|
||||||
|
sleep 1
|
||||||
|
|
||||||
# Step 6: Start the setup process with release and global options
|
# Step 6: Start the setup process with release and global options
|
||||||
echo "Starting the setup process..."
|
echo "Starting the setup process..."
|
||||||
./scripts/starter.sh --release --make-global
|
./scripts/starter.sh --release --make-global
|
||||||
@ -868,12 +880,17 @@ reconnect_peers() {
|
|||||||
# Final step: Notify the user of successful completion
|
# Final step: Notify the user of successful completion
|
||||||
echo "Reconnect process completed successfully!"
|
echo "Reconnect process completed successfully!"
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "Error: Directory $GHOST_NODE_DIR does not exist."
|
||||||
|
echo "Please run the setup_node function first."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Call the Master function to display the menu
|
# Call the Master function to display the menu
|
||||||
master
|
master
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
enable_service() {
|
enable_service() {
|
||||||
echo "Enabling the ghost-node service to start at boot..."
|
echo "Enabling the ghost-node service to start at boot..."
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user