Update (Light node)
systemctl stop avail_light
rm /usr/local/bin/avail_light
mkdir .avail/ && mkdir .avail/identity/
cp /root/avail-light/target/release/identity.toml /root/.avail/identity/
rm -rf avail-ligh .avail-lightsudo bash -c "cat > /root/.avail/availscript.sh" <<EOF
#!/bin/bash
# official script command of Avail script from daningyn
COMMAND="curl -sL1 avail.sh | bash"
# Here is script making LC restart if getting errors
while true; do echo "Starting command: \$COMMAND"
# Run command in the background
bash -c "\$COMMAND" &
PID=\$!
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
sleep 10
done
EOFLast updated
Was this helpful?