# $Id$ # loads client classes from $MCORE_LIBDIR load_classes() { local class local classtype case $1 in client|control) classtype="$1" ;; *) die "Unknown classes type '$1'" ;; esac # client specific for class in $(find ${MCORE_LIBDIR}/include -type f -name \*.${classtype}.class) do include ${class} || eecho "error loading ${class}" 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 -SIGTERM ${pid} done } # 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