projects
/
mkws-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
4ca8264
)
use a special UserAgent for curl requests:
author
Wolfram Schneider
<wosch@indexdata.dk>
Tue, 14 Jan 2014 10:31:14 +0000
(10:31 +0000)
committer
Wolfram Schneider
<wosch@indexdata.dk>
Tue, 14 Jan 2014 10:31:14 +0000
(10:31 +0000)
nagios service-proxy v0.9
tools/bin/nagios-service-proxy.sh
patch
|
blob
|
history
diff --git
a/tools/bin/nagios-service-proxy.sh
b/tools/bin/nagios-service-proxy.sh
index
9d58a31
..
2904e85
100755
(executable)
--- a/
tools/bin/nagios-service-proxy.sh
+++ b/
tools/bin/nagios-service-proxy.sh
@@
-7,12
+7,13
@@
set -e
: ${mkws_host="http://mkws.indexdata.com/service-proxy/"}
: ${mkws_username="mkws"}
: ${mkws_password="mkws"}
+: ${user_agent="nagios service-proxy v0.9"}
tempfile=$(mktemp)
exit=0
url="$mkws_host?command=auth&action=login&username=$mkws_username&password=$mkws_password"
-if curl -sSf "$url" > $tempfile; then
+if curl -sSf -A "$user_agent" "$url" > $tempfile; then
if ! egrep -q '<status>OK</status>' $tempfile; then
echo "status not OK"
exit=1