2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-08 13:24:56 +00:00

configdb: use modpath

git-svn-id: https://svn.fhem.de/fhem/trunk@11495 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2016-05-22 16:33:23 +00:00
parent 12aa7c71ef
commit bdf8d639e0

View File

@ -63,7 +63,8 @@ sub CommandConfigdb($$) {
if ($dbtype eq 'SQLITE') {
my $ts = strftime('%Y-%m-%d_%H-%M-%S',localtime);
my $target = AttrVal('global','modpath','.')."/log/configDB_$ts.dump.gz";
my $mp = AttrVal('global','modpath','.');
my $target = "$mp/log/configDB_$ts.dump.gz";
Log3('configdb', 4, "configdb: target for database dump: $target");
my $ret = qx(echo '.dump' | sqlite3 /opt/fhem/configDB.db | gzip -c > $target);
return $ret if $ret; # return error message if available