mirror of
https://github.com/rejetto/hfs2.git
synced 2025-12-19 10:03:56 +01:00
new 'init' section for events file, executed at each reload
This commit is contained in:
parent
07f5f2ca6b
commit
65d4a142e4
13
main.pas
13
main.pas
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
Copyright (C) 2002-2020 Massimo Melina (www.rejetto.com)
|
Copyright (C) 2002-2020 Massimo Melina (www.rejetto.com)
|
||||||
|
|
||||||
This file is part of HFS ~ HTTP File Server.
|
This file is part of HFS ~ HTTP File Server.
|
||||||
@ -7867,7 +7867,12 @@ finally freeAndNIL(info) end;
|
|||||||
end; // autoCheckUpdates
|
end; // autoCheckUpdates
|
||||||
|
|
||||||
procedure loadEvents();
|
procedure loadEvents();
|
||||||
begin eventScripts.fullText:=loadTextFile(cfgpath+EVENTSCRIPTS_FILE) end;
|
begin
|
||||||
|
if not newMtime(cfgpath+EVENTSCRIPTS_FILE, eventScriptsLast) then
|
||||||
|
exit;
|
||||||
|
eventScripts.fullText:=loadTextFile(cfgpath+EVENTSCRIPTS_FILE);
|
||||||
|
runEventScript('init');
|
||||||
|
end;
|
||||||
|
|
||||||
procedure Tmainfrm.updateCopyBtn();
|
procedure Tmainfrm.updateCopyBtn();
|
||||||
resourcestring
|
resourcestring
|
||||||
@ -8124,9 +8129,7 @@ var
|
|||||||
updateCopyBtn();
|
updateCopyBtn();
|
||||||
keepTplUpdated();
|
keepTplUpdated();
|
||||||
updateCurrentCFG();
|
updateCurrentCFG();
|
||||||
|
loadEvents();
|
||||||
if newMtime(cfgpath+EVENTSCRIPTS_FILE, eventScriptsLast) then
|
|
||||||
loadEvents();
|
|
||||||
|
|
||||||
if assigned(runScriptFrm) and runScriptFrm.visible
|
if assigned(runScriptFrm) and runScriptFrm.visible
|
||||||
and runScriptFrm.autorunChk.checked and newMtime(tempScriptFilename, runScriptLast) then
|
and runScriptFrm.autorunChk.checked and newMtime(tempScriptFilename, runScriptLast) then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user