Magellan Linux

Contents of /mcore-src/trunk/mcore-tools/src/include/control.global.class.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2528 - (show annotations) (download)
Tue Sep 15 07:22:37 2015 UTC (8 years, 7 months ago) by niro
File size: 691 byte(s)
-use debug echo function decho()
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 decho "table '${table}'->resource '${resource}'=value '${value}' for serial='${serial}'"
11
12 mysql_insert "${table}",serial="${serial}","${resource}"="${value}"
13 }
14
15 control_client()
16 {
17 local serial="$1"
18 local command="${@/$1/}"
19 local SSLSAY_IP
20 local SSLSAY_PORT
21
22 SSLSAY_IP=$(mysqldo "select ip from state_connected where serial='${serial}'")
23 if [[ -z ${SSLSAY_IP} ]]
24 then
25 echo "no ip found for client '${serial}'"
26 return 1
27 fi
28
29 SSLSAY_PORT="6666"
30 case "${command}" in
31 ' run-queue'|run-queue) nsslsay_queue_run_fingerprint ;;
32 *) nsslsay_fingerprint "${command}" ;;
33 esac
34 }