# $Id$ # loads client classes from $MCORE_LIBDIR load_client_classes() { local i # client specific for i in $(find ${MCORE_LIBDIR}/include -type f -name \*.client.class) do include ${i} || eecho "error loading ${i}" done } # restarts the whole service via remote cmd restart_service() { local pid for pid in $(pidof sslsvd) do kill -SIGHUP ${pid} done } # stops the whole service via remote cmd stop_service() { local pid for pid in $(pidof sslsvd) do kill -15 ${pid} sleep 1 kill -9 ${pid} done } # # import_resource $table $serial $resource $value # 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}" # } # run_class $method $caller $argv1 $argv2 ... $argvN run_class() { local method="${GLOBAL_ARGV[0]}" local caller="${GLOBAL_ARGV[1]}" local class local cmd local i local count if valid_session then class="${caller%.*}" cmd="${caller#*.}" # copy GLOBAL_ARGV to CLASS_ARGV array without method and caller.class unset CLASS_ARGV count="${#GLOBAL_ARGV[*]}" for (( i=2; i