ADD: using a configDB and logDB is mandatory now
This commit is contained in:
parent
ad60fc3490
commit
95dda4d843
@ -1,11 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z ${USECONFIGDB} ]; then
|
||||
CFG=/opt/fhem/fhem.cfg
|
||||
|
||||
else
|
||||
|
||||
CFG=configDB
|
||||
|
||||
if [ -z ${CONFIG_DATABASE_ENGINE} ]; then
|
||||
CONFIG_DATABASE_ENGINE=sqlite
|
||||
@ -30,15 +24,15 @@ else
|
||||
);
|
||||
EOF
|
||||
`" >> /opt/fhem/configDB.conf;
|
||||
elif [ "${CONFIG_DATABASE_ENGINE}" == "mysql" ] then
|
||||
elif [ "${CONFIG_DATABASE_ENGINE}" == "mysql" ]; then
|
||||
|
||||
if [ -z ${CONFIG_DATABASE_USER} ]; then
|
||||
echo "please provide CONFIG_DATABASE_USER "
|
||||
exit 255
|
||||
fi
|
||||
|
||||
if [ -z ${CONFIG_DATABASE_USER} ]; then
|
||||
echo "please provide CONFIG_DATABASE_ "
|
||||
if [ -z ${CONFIG_DATABASE_PASS} ]; then
|
||||
echo "please provide CONFIG_DATABASE_PASS"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
@ -49,16 +43,12 @@ else
|
||||
password => "${CONFIG_DATABASE_PASS}"
|
||||
);
|
||||
EOF
|
||||
`" >> /opt/fhem/configDB.conf;
|
||||
else
|
||||
echo "unknown database engine provided in CONFIG_DATABASE_ENGINE"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
if [ -n "${USELOGDB}" ]; then
|
||||
|
||||
if [ -z ${LOG_DATABASE_ENGINE} ]; then
|
||||
LOG_DATABASE_ENGINE=sqlite
|
||||
|
||||
@ -69,6 +59,7 @@ if [ -n "${USELOGDB}" ]; then
|
||||
fi
|
||||
|
||||
if [ -z ${LOG_DATABASE} ]; then
|
||||
echo "please provide LOG_DATABASE name"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
@ -89,8 +80,8 @@ if [ -n "${USELOGDB}" ]; then
|
||||
exit 255
|
||||
fi
|
||||
|
||||
if [ -z ${LOG_DATABASE_USER} ]; then
|
||||
echo "please provide LOG_DATABASE_ "
|
||||
if [ -z ${LOG_DATABASE_PASS} ]; then
|
||||
echo "please provide LOG_DATABASE_PASS "
|
||||
exit 255
|
||||
fi
|
||||
|
||||
@ -101,13 +92,13 @@ if [ -n "${USELOGDB}" ]; then
|
||||
password => "${LOG_DATABASE_PASS}"
|
||||
);
|
||||
EOF
|
||||
`" >> /opt/fhem/db.conf;
|
||||
else
|
||||
echo "unknown database engine provided in LOG_DATABASE_ENGINE"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
export FHEM_GLOBALATTR="nofork=1 updateInBackground=1 logfile=/dev/stdout"
|
||||
cd /opt/fhem || exit 255
|
||||
./fhem.pl ${CFG}
|
||||
./fhem.pl confgDB
|
Loading…
Reference in New Issue
Block a user