〰️Light Client
Finally, the Avail Light Client Challenge has officially begun. Let's hunt for NFTs of the project together.
Prepare
How
sudo apt install tmux -y
tmuxnano script.sh#!/bin/bash
# official script command of Avail
COMMAND="curl -sL1 avail.sh | bash"
# Here is script making LC restart if getting errors
while true; do
echo "Starting command: $COMMAND"
# Chạy lệnh trong background
bash -c "$COMMAND" &
# Lấy ID quá trình của tiến trình vừa chạy
PID=$!
# Đợi tiến trình con hoàn thành
wait $PID
EXIT_STATUS=$?
if [ $EXIT_STATUS -eq 0 ]; then
echo "Command exited successfully. Restarting..."
else
echo "Command failed with status $EXIT_STATUS. Restarting..."
fi
# Chờ một khoảng thời gian trước khi khởi động lại, để tránh khởi động lại quá nhanh
sleep 10
done



Last updated