Make logc standard in these monitor* scripts
This commit is contained in:
parent
18fcac5e99
commit
fd714bf99a
1 changed files with 2 additions and 5 deletions
|
@ -1,12 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
RHIZO_SCRIPT="/home/rhizomatica/bin"
|
||||||
|
. $RHIZO_SCRIPT/vars.sh
|
||||||
|
|
||||||
LOGFILE="/var/log/monitor_rapi.log"
|
LOGFILE="/var/log/monitor_rapi.log"
|
||||||
|
|
||||||
function logc() {
|
|
||||||
txt=$1
|
|
||||||
echo "[`date '+%d-%m-%Y %H:%M:%S'`] $txt" >> $LOGFILE
|
|
||||||
}
|
|
||||||
|
|
||||||
curl --connect-timeout 180 --max-time 180 -X GET http://localhost:8085/configuration/site 2>/dev/null
|
curl --connect-timeout 180 --max-time 180 -X GET http://localhost:8085/configuration/site 2>/dev/null
|
||||||
if [ $? -gt 0 ]; then
|
if [ $? -gt 0 ]; then
|
||||||
logc "RAPI is not responding kill the process"
|
logc "RAPI is not responding kill the process"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue