Update dsmon.sh
This commit is contained in:
4
dsmon.sh
4
dsmon.sh
@@ -112,7 +112,7 @@ CHECK(){
|
||||
echo -en "${idsCL[LightCyan]}${MSG}${spc}: "
|
||||
fi
|
||||
if [ -n "${1}" ] && [ "${1}" != "report" ]; then
|
||||
echo "SELECT id,host,ip,limits FROM servermonitor.hosts WHERE disabled=0 AND (host LIKE '%${1}' OR ip LIKE '%${1}')"
|
||||
echo "SELECT id,host,ip,limits FROM servermonitor.hosts WHERE disabled=0 AND (host LIKE '%${1}%' OR ip LIKE '%${1}%')"
|
||||
while read hostid hostname hostip hostlimits; do
|
||||
if [ "$hostid" != "id" ]; then
|
||||
hostip=$(echo $hostip | cut -d ";" -f1)
|
||||
@@ -123,7 +123,7 @@ CHECK(){
|
||||
host_ids[$hostname]=$hostid
|
||||
hostnames_sort+=("$hostname")
|
||||
fi
|
||||
done <<< $(MYSQL_PWD="sysmoninsert" ${mysqlcmd} ${mysql_conn} -u sysmoninsert -e "SELECT id,host,ip,limits FROM servermonitor.hosts WHERE disabled=0 AND (host LIKE '%${1}' OR ip LIKE '%${1}')")
|
||||
done <<< $(MYSQL_PWD="sysmoninsert" ${mysqlcmd} ${mysql_conn} -u sysmoninsert -e "SELECT id,host,ip,limits FROM servermonitor.hosts WHERE disabled=0 AND (host LIKE '%${1}%' OR ip LIKE '%${1}%')")
|
||||
else
|
||||
while read hostid hostname hostip hostlimits; do
|
||||
if [ "$hostid" != "id" ]; then
|
||||
|
||||
Reference in New Issue
Block a user