Skip to content

Instantly share code, notes, and snippets.

@Jiu-hong
Created March 3, 2023 11:36
Show Gist options
  • Select an option

  • Save Jiu-hong/0f604c39f877a8df39f8a26fa6a02ed4 to your computer and use it in GitHub Desktop.

Select an option

Save Jiu-hong/0f604c39f877a8df39f8a26fa6a02ed4 to your computer and use it in GitHub Desktop.
send log when node is down
while true
do
STATUS="$(systemctl is-active casper-node-launcher.service)"
if [ "${STATUS}" = "active" ]; then
# send logs
sudo logrotate -f /etc/logrotate.d/casper-node
curl -sSf https://cnm.casperlabs.io/debug_upload_script | bash > done.txt
break
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment