# $Id$ import_resource() { local table="$1" local serial="$2" local resource="$3" local value="$4" if [[ ${DEBUG} = 1 ]] then echo "${table}->${resource}=${value}" >> /root/lala.log echo "mysqldo \"update ${table} set ${resource}='${value}' where serial=${serial};\"" >> /root/lala.log fi mysql_insert "${table}",serial="${serial}","${resource}"="${value}" } control_client() { local serial="$1" local command="${@/$1/}" local SSLSAY_IP local SSLSAY_PORT SSLSAY_IP=$(mysqldo "select ip from state_connected where serial='${serial}'") if [[ -z ${SSLSAY_IP} ]] then echo "no ip found for client '${serial}'" return 1 fi SSLSAY_PORT="6666" case "${command}" in run-queue) nsslsay_queue_run_fingerprint ;; *) nsslsay_fingerprint "${command}" ;; esac }