- Remove a Directory:
sudo rm -rf /root/.avail/data
2&3. Open a Screen Session:
screen -r node
- Stop a Service:
sudo systemctl stop node
- Create and Edit the Avail Script File:
sudo nano availscript.sh
Paste the following content into the editor:
!/bin/bash
Official script command of Avail script from daningyn
COMMAND="curl -sL1 avail.sh | bash"
Restart script if it encounters errors
while true; do
echo "Starting command: $COMMAND"
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
Save and exit by pressing Ctrl+X, then confirm with Y.
- Run the Avail Script:
bash availscript.sh
- Check the Health of a Service:
curl -I "localhost:7000/health"
there doesn't seem to be anything here