Fix send_message function
This commit is contained in:
parent
8baca09ad0
commit
72334260c3
@ -15,20 +15,19 @@ set -o nounset
|
||||
# Don't hide errors within pipes
|
||||
set -o pipefail
|
||||
|
||||
# Set your API key here
|
||||
# set your API key here
|
||||
key=
|
||||
|
||||
# Set your chat id here
|
||||
# set your chat id here
|
||||
chat_id=
|
||||
|
||||
function send_message() {
|
||||
if ! [ $# -eq 0 ]; then
|
||||
curl --silent --show-error --fail --request POST "https://api.telegram.org/$key/sendMessage" --data chat_id="$chat_id" --data text="$1" --output /dev/null
|
||||
exit
|
||||
else
|
||||
echo "No argument supplied, please specify the message to send"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "No argument supplied, please specify the message to send"
|
||||
exit 1
|
||||
}
|
||||
|
||||
function backup_vaultwarden {
|
||||
|
Loading…
Reference in New Issue
Block a user