Contents of /mcore-src/trunk/mcore-tools/src/include/control.global.class.in
Parent Directory | Revision Log
Revision 2492 -
(show annotations)
(download)
Thu Sep 10 13:40:12 2015 UTC (9 years ago) by niro
File size: 798 byte(s)
Thu Sep 10 13:40:12 2015 UTC (9 years ago) by niro
File size: 798 byte(s)
-control_client(): fixed whitespace evaluation
1 | # $Id$ |
2 | |
3 | import_resource() |
4 | { |
5 | local table="$1" |
6 | local serial="$2" |
7 | local resource="$3" |
8 | local value="$4" |
9 | |
10 | if [[ ${DEBUG} = 1 ]] |
11 | then |
12 | echo "${table}->${resource}=${value}" >> /root/lala.log |
13 | echo "mysqldo \"update ${table} set ${resource}='${value}' where serial=${serial};\"" >> /root/lala.log |
14 | fi |
15 | |
16 | mysql_insert "${table}",serial="${serial}","${resource}"="${value}" |
17 | } |
18 | |
19 | control_client() |
20 | { |
21 | local serial="$1" |
22 | local command="${@/$1/}" |
23 | local SSLSAY_IP |
24 | local SSLSAY_PORT |
25 | |
26 | SSLSAY_IP=$(mysqldo "select ip from state_connected where serial='${serial}'") |
27 | if [[ -z ${SSLSAY_IP} ]] |
28 | then |
29 | echo "no ip found for client '${serial}'" |
30 | return 1 |
31 | fi |
32 | |
33 | SSLSAY_PORT="6666" |
34 | case "${command}" in |
35 | ' run-queue'|run-queue) nsslsay_queue_run_fingerprint ;; |
36 | *) nsslsay_fingerprint "${command}" ;; |
37 | esac |
38 | } |