mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
configDB.pm: move rescue modes from ENV to config file
git-svn-id: https://svn.fhem.de/fhem/trunk@16486 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
2631415487
commit
cc14ec521a
@ -254,6 +254,8 @@ $configDB{attr}{nostate} = defined($dbconfig{nostate}) ? $dbconfig{nosta
|
|||||||
$configDB{attr}{rescue} = defined($dbconfig{rescue}) ? $dbconfig{rescue} : 0;
|
$configDB{attr}{rescue} = defined($dbconfig{rescue}) ? $dbconfig{rescue} : 0;
|
||||||
$configDB{attr}{loadversion} = defined($dbconfig{loadversion}) ? $dbconfig{loadversion} : 0;
|
$configDB{attr}{loadversion} = defined($dbconfig{loadversion}) ? $dbconfig{loadversion} : 0;
|
||||||
|
|
||||||
|
#$configDB{attr}{rescue} = 1;
|
||||||
|
|
||||||
##################################################
|
##################################################
|
||||||
# Basic functions needed for DB configuration
|
# Basic functions needed for DB configuration
|
||||||
# directly called from fhem.pl
|
# directly called from fhem.pl
|
||||||
@ -286,13 +288,14 @@ sub cfgDB_Init() {
|
|||||||
$fhem_dbh->do("INSERT INTO fhemversions values (0, '$uuid')");
|
$fhem_dbh->do("INSERT INTO fhemversions values (0, '$uuid')");
|
||||||
_cfgDB_InsertLine($fhem_dbh, $uuid, '#created by cfgDB_Init',0);
|
_cfgDB_InsertLine($fhem_dbh, $uuid, '#created by cfgDB_Init',0);
|
||||||
_cfgDB_InsertLine($fhem_dbh, $uuid, 'attr global logdir ./log',1);
|
_cfgDB_InsertLine($fhem_dbh, $uuid, 'attr global logdir ./log',1);
|
||||||
_cfgDB_InsertLine($fhem_dbh, $uuid, 'attr global logfile %L/fhem-%Y-%m-%d.log',1);
|
_cfgDB_InsertLine($fhem_dbh, $uuid, 'attr global logfile %L/fhem-%Y-%m-%d.log',2);
|
||||||
_cfgDB_InsertLine($fhem_dbh, $uuid, 'attr global modpath .',2);
|
_cfgDB_InsertLine($fhem_dbh, $uuid, 'attr global modpath .',3);
|
||||||
_cfgDB_InsertLine($fhem_dbh, $uuid, 'attr global userattr devStateIcon devStateStyle icon sortby webCmd',3);
|
_cfgDB_InsertLine($fhem_dbh, $uuid, 'attr global userattr devStateIcon devStateStyle icon sortby webCmd',4);
|
||||||
_cfgDB_InsertLine($fhem_dbh, $uuid, 'attr global verbose 3',4);
|
_cfgDB_InsertLine($fhem_dbh, $uuid, 'attr global verbose 3',5);
|
||||||
_cfgDB_InsertLine($fhem_dbh, $uuid, 'define telnetPort telnet 7072 global',5);
|
_cfgDB_InsertLine($fhem_dbh, $uuid, 'define telnetPort telnet 7072 global',6);
|
||||||
_cfgDB_InsertLine($fhem_dbh, $uuid, 'define web FHEMWEB 8083 global',6);
|
_cfgDB_InsertLine($fhem_dbh, $uuid, 'define web FHEMWEB 8083 global',7);
|
||||||
_cfgDB_InsertLine($fhem_dbh, $uuid, 'define Logfile FileLog %L/fhem-%Y-%m-%d.log fakelog',7);
|
_cfgDB_InsertLine($fhem_dbh, $uuid, 'attr web allowfrom .*',8);
|
||||||
|
_cfgDB_InsertLine($fhem_dbh, $uuid, 'define Logfile FileLog %L/fhem-%Y-%m-%d.log fakelog',9);
|
||||||
}
|
}
|
||||||
|
|
||||||
# create TABLE fhemstate if nonexistent
|
# create TABLE fhemstate if nonexistent
|
||||||
@ -470,7 +473,8 @@ sub cfgDB_ReadAll($) {
|
|||||||
push (@dbconfig, 'attr global modpath .');
|
push (@dbconfig, 'attr global modpath .');
|
||||||
push (@dbconfig, 'attr global verbose 3');
|
push (@dbconfig, 'attr global verbose 3');
|
||||||
push (@dbconfig, 'define telnetPort telnet 7072 global');
|
push (@dbconfig, 'define telnetPort telnet 7072 global');
|
||||||
push (@dbconfig, 'define WEB FHEMWEB 8083 global');
|
push (@dbconfig, 'define web FHEMWEB 8083 global');
|
||||||
|
push (@dbconfig, 'attr web allowfrom .*');
|
||||||
push (@dbconfig, 'define Logfile FileLog ./log/fhem-%Y-%m-%d.log fakelog');
|
push (@dbconfig, 'define Logfile FileLog ./log/fhem-%Y-%m-%d.log fakelog');
|
||||||
} else {
|
} else {
|
||||||
# add Config Rows to commandfile
|
# add Config Rows to commandfile
|
||||||
|
Loading…
x
Reference in New Issue
Block a user