GUIDE
If you already configure peggo .env and systemd service, you can simply upgrade using this script.
The instruction to setup .env and systemd services can be found here
# ./upgrade.sh [OS] [network-directory] [release-version]
./upgrade.sh macos staking/40007 v4.0.7-1622621583