shutdown/rereadcfg added
git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@932 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -706,7 +706,7 @@ A line ending with \ will be concatenated with the next one, so long lines
|
|||||||
Re-read the configuration file.
|
Re-read the configuration file.
|
||||||
Note: The statefile will be saved first, then the config file will be read
|
Note: The statefile will be saved first, then the config file will be read
|
||||||
(all devices will be initialized again), and at last the statefile will be
|
(all devices will be initialized again), and at last the statefile will be
|
||||||
reloaded.
|
reloaded. It triggers upon completion the global:REREADCFG event.
|
||||||
<br><br>
|
<br><br>
|
||||||
Example:
|
Example:
|
||||||
<ul>
|
<ul>
|
||||||
@@ -783,7 +783,7 @@ A line ending with \ will be concatenated with the next one, so long lines
|
|||||||
<code>shutdown</code>
|
<code>shutdown</code>
|
||||||
<br><br>
|
<br><br>
|
||||||
Shut down the server (after saving the <a href="#statefile">state information
|
Shut down the server (after saving the <a href="#statefile">state information
|
||||||
</a>)
|
</a>). It triggers the global:SHUTDOWN event.
|
||||||
<br><br>
|
<br><br>
|
||||||
Example:
|
Example:
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
4
fhem.pl
4
fhem.pl
@@ -167,7 +167,7 @@ my $nextat; # Time when next timer will be triggered.
|
|||||||
my $intAtCnt=0;
|
my $intAtCnt=0;
|
||||||
my %duplicate; # Pool of received msg for multi-fhz/cul setups
|
my %duplicate; # Pool of received msg for multi-fhz/cul setups
|
||||||
my $duplidx=0; # helper for the above pool
|
my $duplidx=0; # helper for the above pool
|
||||||
my $cvsid = '$Id: fhem.pl,v 1.144 2011-06-19 06:17:27 rudolfkoenig Exp $';
|
my $cvsid = '$Id: fhem.pl,v 1.145 2011-07-07 08:46:28 rudolfkoenig Exp $';
|
||||||
my $namedef =
|
my $namedef =
|
||||||
"where <name> is either:\n" .
|
"where <name> is either:\n" .
|
||||||
"- a single device name\n" .
|
"- a single device name\n" .
|
||||||
@@ -912,6 +912,7 @@ CommandRereadCfg($$)
|
|||||||
if(!$ret && $attr{global}{statefile} && -r $attr{global}{statefile}) {
|
if(!$ret && $attr{global}{statefile} && -r $attr{global}{statefile}) {
|
||||||
$ret = CommandInclude($cl, $attr{global}{statefile});
|
$ret = CommandInclude($cl, $attr{global}{statefile});
|
||||||
}
|
}
|
||||||
|
DoTrigger("global", "REREADCFG");
|
||||||
|
|
||||||
$reread_active=0;
|
$reread_active=0;
|
||||||
return $ret;
|
return $ret;
|
||||||
@@ -1021,6 +1022,7 @@ sub
|
|||||||
CommandShutdown($$)
|
CommandShutdown($$)
|
||||||
{
|
{
|
||||||
my ($cl, $param) = @_;
|
my ($cl, $param) = @_;
|
||||||
|
DoTrigger("global", "SHUTDOWN");
|
||||||
Log 0, "Server shutdown";
|
Log 0, "Server shutdown";
|
||||||
|
|
||||||
foreach my $d (sort keys %defs) {
|
foreach my $d (sort keys %defs) {
|
||||||
|
|||||||
Reference in New Issue
Block a user