Skip to content

Commit

Permalink
Merge pull request #10 from dappnode/pablo/set-notification-dappmanager
Browse files Browse the repository at this point in the history
Send dappmanager notification
  • Loading branch information
pablomendezroyo authored Jun 27, 2022
2 parents f9adad9 + 78fd557 commit 7959e92
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions web3signer/reload-keys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,24 @@ function response_middleware() {
000)
{
log warn "${api} is not available, make sure the server is listening: ${content}, HTTP code ${http_code}"
[[ $api != "web3signer" ]] && send_dappmanager_notification
exit 0
}
;;
*)
{
log error "error response from ${api}: ${content}, HTTP code ${http_code}"
[[ $api != "web3signer" ]] && send_dappmanager_notification
exit 0
}
;;
esac
}

function send_dappmanager_notification() {
curl -X POST -G 'http://my.dappnode/notification-send' --data-urlencode 'type=danger' --data-urlencode title="$ETH2_CLIENT is not available" --data-urlencode 'body=Make sure you select an available client in the web3signer at packages > web3signer > config > eth2client'
}

##################
# WEB3SIGNER API #
##################
Expand Down

0 comments on commit 7959e92

Please sign in to comment.