diff --git a/fhem/docs/commandref_frame.html b/fhem/docs/commandref_frame.html
index bd4790e1d..4653a1e4b 100644
--- a/fhem/docs/commandref_frame.html
+++ b/fhem/docs/commandref_frame.html
@@ -1417,12 +1417,18 @@ The following local attributes are used by a wider range of devices:
hidden, and will only be visible, if this attribute is set to 1.
The attribute is checked by the list command, by the FHEMWEB room
overview and by xmllist.
-
+
stacktrace
if set (to 1), dump a stacktrace to the log for each "PERL WARNING".
+
+
+
+ restartDelay
+ set the delay for shutdown restart, default is 2 (seconds).
+
diff --git a/fhem/docs/commandref_frame_DE.html b/fhem/docs/commandref_frame_DE.html
index 2d1755d13..e08f1e4e5 100644
--- a/fhem/docs/commandref_frame_DE.html
+++ b/fhem/docs/commandref_frame_DE.html
@@ -1511,13 +1511,20 @@ Die folgenden lokalen Attribute werden von mehreren Geräten verwendet:
werden nicht angezeigt, es sei denn das globale Attribut
showInternalValues ist gesetzt. Diese Variable wird bei dem list und
xmllist Befehl, und bei der FHEMWEB Raumansicht geprüft.
-
+
stacktrace
Falls gesetzt (auf 1), schreibt ins FHEM-Log zusätzlich zu jedem
"PERL WARNING" den stacktrace.
+
+
+
+ restartDelay
+ setzt die Verzögerung beim Neustart mit shutdown restart, die
+ Voreinstellung ist 2 (Sekunden).
+
diff --git a/fhem/fhem.pl b/fhem/fhem.pl
index 949d4402e..31f3a0f29 100755
--- a/fhem/fhem.pl
+++ b/fhem/fhem.pl
@@ -247,15 +247,47 @@ $readytimeout = ($^O eq "MSWin32") ? 0.1 : 5.0;
$modules{Global}{ORDER} = -1;
$modules{Global}{LOADED} = 1;
-$modules{Global}{AttrList} =
- "archivecmd apiversion archivedir configfile lastinclude logfile " .
- "modpath nrarchive pidfilename port statefile title " .
- "mseclog:1,0 version nofork:1,0 language:EN,DE logdir holiday2we " .
- "autoload_undefined_devices:1,0 dupTimeout latitude longitude altitude " .
- "backupcmd backupdir backupsymlink backup_before_update " .
- "exclude_from_update motd restoreDirs uniqueID ".
- "sendStatistics:onUpdate,manually,never updateInBackground:1,0 ".
- "showInternalValues:1,0 stacktrace:1,0 ";
+no warnings 'qw';
+my @globalAttrList = qw(
+ altitude
+ apiversion
+ archivecmd
+ archivedir
+ autoload_undefined_devices:1,0
+ backup_before_update
+ backupcmd
+ backupdir
+ backupsymlink
+ configfile
+ dupTimeout
+ exclude_from_update
+ holiday2we
+ language:EN,DE
+ lastinclude
+ latitude
+ logdir
+ logfile
+ longitude
+ modpath
+ motd
+ mseclog:1,0
+ nofork:1,0
+ nrarchive
+ pidfilename
+ port
+ restartDelay
+ restoreDirs
+ sendStatistics:onUpdate,manually,never
+ showInternalValues:1,0
+ stacktrace:1,0
+ statefile
+ title
+ uniqueID
+ updateInBackground:1,0
+ version
+);
+use warnings 'qw';
+$modules{Global}{AttrList} = join(" ", @globalAttrList);
$modules{Global}{AttrFn} = "GlobalAttr";
use vars qw($readingFnAttributes);
@@ -1433,7 +1465,8 @@ CommandShutdown($$)
unlink($attr{global}{pidfilename}) if($attr{global}{pidfilename});
if($param && $param eq "restart") {
if ($^O !~ m/Win/) {
- system("(sleep 2; exec $^X $0 $attr{global}{configfile})&");
+ system("(sleep " . AttrVal("global", "restartDelay", 2) .
+ "; exec $^X $0 $attr{global}{configfile})&");
} elsif ($winService->{AsAService}) {
# use the OS SCM to stop and start the service
exec('cmd.exe /C net stop fhem & net start fhem');