New lhttp main

This commit is contained in:
René Linder 2023-03-30 15:46:01 +02:00
parent ce46b5c8de
commit ab08722bcf

View file

@ -39,11 +39,11 @@ Repeat
PrintN(" Activate Debug Log") PrintN(" Activate Debug Log")
ElseIf Left(Parameter,3) = "-c=" Or Left(Parameter,9) = "--config=" ElseIf Left(Parameter,3) = "-c=" Or Left(Parameter,9) = "--config="
Configfile = Right(Parameter, Len(Parameter) - FindString(Parameter, "=") + 1) Configfile = Right(Parameter, Len(Parameter) - FindString(Parameter, "="))
If ReadFile(0, Configfile) If ReadFile(0, Configfile)
CloseFile(0) CloseFile(0)
Else Else
PrintN("Failed unable to open config file") PrintN("Failed unable to open config file:["+Configfile+"]")
End End
EndIf EndIf
ElseIf Left(Parameter,6) = "--run=" ElseIf Left(Parameter,6) = "--run="
@ -82,7 +82,7 @@ XIncludeFile "lweb.pbi"
PrintN("lhttpd Webserver "+Version) PrintN("lhttpd Webserver "+Version)
If Len(Checkruntime) > 0 If Len(Checkruntime) > 0
If CreateFile(0, Checkruntime) If ReadFile(0, Checkruntime)
CloseFile(0) CloseFile(0)
PrintN("PID File created --run="+Checkruntime) PrintN("PID File created --run="+Checkruntime)
Else Else