14 |
include ${MCORE_LIBDIR}/include/daemon.global.class |
include ${MCORE_LIBDIR}/include/daemon.global.class |
15 |
include ${MCORE_LIBDIR}/include/sessionauth.global.class |
include ${MCORE_LIBDIR}/include/sessionauth.global.class |
16 |
include ${MCORE_LIBDIR}/include/mysqlfunctions.global.class |
include ${MCORE_LIBDIR}/include/mysqlfunctions.global.class |
17 |
|
include ${MCORE_LIBDIR}/include/register.global.class |
18 |
#include ${MCORE_LIBDIR}/include/hwdetection.global.class |
#include ${MCORE_LIBDIR}/include/hwdetection.global.class |
19 |
|
|
20 |
# load control classes plugins |
# load control classes plugins |
21 |
load_classes control |
load_classes control |
22 |
|
|
23 |
SQL_USER=alx |
# config settings |
24 |
|
include @@SYSCONFDIR@@/mcore/mcore.conf |
25 |
|
|
26 |
|
SQL_USER=alx_install |
27 |
SQL_PASS=@lx |
SQL_PASS=@lx |
28 |
SQL_HOST=localhost |
SQL_HOST=localhost |
29 |
SQL_DB=alx_web |
SQL_DB=alx_web |
30 |
|
|
|
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}" |
|
|
} |
|
|
|
|
|
nsslsay() |
|
|
{ |
|
|
nssl "${IP}" "${PORT}" << EOF |
|
|
auth ${SSLSAY_USER} ${SSLSAY_PASS} |
|
|
$@ |
|
|
quit |
|
|
EOF |
|
|
} |
|
|
|
|
31 |
control_client() |
control_client() |
32 |
{ |
{ |
33 |
local serial="$1" |
local serial="$1" |