CodeBlockLabs
CommunityPromo VPS
  • Welcome
  • Getting Started
    • What is Node?
    • Your First Nodes
  • Blockchain Nodes
    • Banano
      • Installation
      • Node Configuration
      • RPC Command
      • Cli Command
      • Other
    • BlockCast
      • Installation
    • BlockX
      • Installation
      • Useful Command
    • Elys
      • Installation
      • Useful Command
    • LayerEdge
      • Installation
      • Automation
    • Lumera
      • Installation
      • Useful Command
      • Snapshot
    • RaiBlocksOne
      • Installation
      • RPC Command
      • Other
    • RaiCoin
      • Installation
      • Node Configuration
      • RPC Command
      • Other
    • Selfchain
      • Installation
      • Useful Command
      • Snapshot
    • Symphony
      • Installation
      • Useful Command
      • Snapshot
      • Oracle
      • Patch
  • Other
    • Automation Scripts
      • Auto Send
    • Blockchain Explorer
    • Go Version Manager (Multi Go)
    • NodeJS
    • Proxmox
      • Proxmox Installation
      • Proxmox FAQ
    • WSL
      • Linux Packages
Powered by GitBook
On this page
  1. Blockchain Nodes
  2. LayerEdge

Automation

To keep the provers restart when it's died.

Create new file auto.sh

sudo nano auto.sh

Paste Code below to the file and save the file with CTRL+X , Y and Enter

#!/bin/bash

# Path to the light-node executable
LIGHT_NODE="./light-node"

# Infinite loop to keep the script running
while true; do
    # Run the light-node
    $LIGHT_NODE

    # Check the exit status of the light-node
    if [ $? -eq 0 ]; then
        echo "light-node exited normally. Restarting in 5 seconds..."
    else
        echo "light-node crashed or exited with an error. Restarting in 5 seconds..."
    fi

    # Wait for 5 seconds before restarting
    sleep 5
done

Give permission to the file auto.sh

chmod +x auto.sh

Run the automation

./auto.sh

PreviousInstallationNextLumera

Last updated 2 months ago