Start the service and check it's working as expected.
Besu - Command Aliases
daemon-reload# Reload any changes made to the besu.servicebesu-enable# Enable the besu.servicebesu-start# Start the besu.servicebesu-status# View the status of the besu.servicebesu-log# View the besu.service logs
Besu - Update Scripts
Create Besu update script.
vim~/besu-update.sh
~/besu-update.sh
#!/bin/bashset-ewhiletrue; doread-p"Are you sure you want to update Besu? (Y/N) "yncase $yn in[Yy]*)break;;[Nn]*)exit;;* )echo"Please answer Y or N.";;esacdoneread-p"Enter the commit hash you want to checkout: "commit_hash# Delete existing besu directory to avoid commit mismatch errorscd~sudorm-rfbesugitclone--recursivehttps://github.com/hyperledger/besucd~/besugitcheckout $commit_hashechoecho"**************"echo"Making Besu..."echo"**************"./gradlewbuild-xtest./gradlewcleaninstallDist# Check if besu.service is runningservice_was_running=0ifsudosystemctlis-active--quietbesu.service; then service_was_running=1echo"****************"echo"Stopping Besu..."sudosystemctlstopbesu.servicefiecho"Replacing previous version..."sudorm-rf/usr/local/bin/besusudocp-R~/besu/build/install/besu/usr/local/bin# Only start besu.service if it was running originallyif [ $service_was_running -eq1 ]; thenecho"Restarting Besu..."echo"******************"sudosystemctlstartbesu.servicefi