configdb: use modpath

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

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