Add misc/fixes
Includes bot alert and misc files in /tmp/tmp
This commit is contained in:
parent
4f5669d436
commit
4736d7739b
4 changed files with 83 additions and 0 deletions
24
modules/rhizo_base/templates/alert.sh.erb
Normal file
24
modules/rhizo_base/templates/alert.sh.erb
Normal file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Send an Alert via IM system
|
||||
|
||||
rawurlencode() {
|
||||
local string="${@}"
|
||||
local strlen=${#string}
|
||||
local encoded=""
|
||||
local pos c o
|
||||
|
||||
for (( pos=0 ; pos<strlen ; pos++ )); do
|
||||
c=${string:$pos:1}
|
||||
case "$c" in
|
||||
[-_.~a-zA-Z0-9] ) o="${c}" ;;
|
||||
* ) printf -v o '%%%02x' "'$c"
|
||||
esac
|
||||
encoded+="${o}"
|
||||
done
|
||||
_ALERT="${encoded}"
|
||||
}
|
||||
|
||||
rawurlencode $@
|
||||
|
||||
curl -s "<%= @bot_alert_url %>$_ALERT"
|
Loading…
Add table
Add a link
Reference in a new issue