--- mcore-src/trunk/mcore-tools/daemon/include/daemon.global.class 2011/03/10 18:08:47 1639 +++ mcore-src/trunk/mcore-tools/daemon/include/daemon.global.class 2012/08/13 09:32:23 2003 @@ -1,5 +1,25 @@ # $Id$ +# loads client classes from $MCLIBDIR +load_client_classes() +{ + # client specific + for i in ${MCLIBDIR}/include/*.client.class + do + source ${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 +} + # # import_resource $table $serial $resource $value # import_resource() # { @@ -64,6 +84,8 @@ mecho "\tauth - authenticate to the daemon" mecho "\tprovide - shows provides of a system" mecho "\trequire - verify plugin requirements" + mecho "\treload - reloads all client classes plugins" + mecho "\trestart - restarts the daemon" mecho "\tnocolors - disable colors, useful for the webclient" mecho "\tquiet - do not print any unecessary messages" mecho "\thelp - shows help" @@ -86,7 +108,7 @@ # on newer xorg-servers root is not allowed to run progs in a user session x11runas() { - if pidof X + if [[ -n $(pidof X) ]] then su - "${MCORE_UNPRIV_USER}" -c "DISPLAY=${MCORE_XORG_DISPLAY} $@" fi @@ -229,7 +251,7 @@ # sort them alpabetically sorted=$(for i in ${PROVIDE}; do echo "${i}"; done | sort) # do not escape, or CRLFS get printed to screen too - rvecho ${sorted} + rvecho ${sorted} } # message only echo | disabled in quiet mode